#!/usr/bin/perl -w
#
# Written by Anton Ushakov
# Copyright 2003
#     The Board of Trustees of the Leland Stanford Junior University
#
# See LICENSE for licensing terms.

use strict;

my $REMOTE_USER = $ENV{'REMOTE_USER'};
my $AUTHRULE = $ENV{'WEBAUTH_LDAPAUTHRULE'};

require '../util.pl';

print "Content-type: text/html\n\n";

print "<html>";

test_title(6, "attribute retrieval with group authorization");

print<<EOS;

You are accessing a webauth-protected page as the user: $REMOTE_USER<br>
<br>
This test will restrict to privgroup stanford:stanford and retrieve three attributes: displayName, mail, and suAffiliation. If your directory entry contains these attributes, you should see them below as WEBAUTH_LDAP_DISPLAYNAME, WEBAUTH_LDAP_MAIL, and WEBAUTH_LDAP_SUAFFILIATION 
<br>
In this case, you have been authorized by "$AUTHRULE" as you can see by the environment variable WEBAUTH_LDAPAUTHRULE below.
<br>
EOS

&unauth_return_links;

&dump_stuff;

print "</html>";

