|
From: Chris W. <la...@us...> - 2001-10-25 15:23:31
|
Update of /cvsroot/openinteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv29059
Modified Files:
OpenInteract.pm
Log Message:
add the 'is_admin' check in setup_authentication()
Index: OpenInteract.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** OpenInteract.pm 2001/10/17 04:47:07 1.14
--- OpenInteract.pm 2001/10/25 15:23:29 1.15
***************
*** 9,13 ****
@OpenInteract::ISA = ();
$OpenInteract::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
! $OpenInteract::DIST_VERSION = '1.28';
# Generic separator used in display
--- 9,13 ----
@OpenInteract::ISA = ();
$OpenInteract::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
! $OpenInteract::DIST_VERSION = '1.31';
# Generic separator used in display
***************
*** 264,282 ****
sub setup_authentication {
my ( $class, $R ) = @_;
! unless ( $R->auth ) {
! my $error_msg = "Authentication cannot be setup! Please ensure 'auth' is setup in your " .
! "server configuration under 'system_alias'";
! $R->send_html( $R->apache, $error_msg, $R );
! die OK . "\n";
}
! eval {
! $R->auth->user;
! $R->auth->group;
! };
! if ( $@ ) {
! $R->send_html( $R->apache, $@, $R );
! die OK . "\n";
}
! return undef;
}
--- 264,284 ----
sub setup_authentication {
my ( $class, $R ) = @_;
! my ( $error_msg );
! if ( my $auth_class = $R->auth ) {
! eval {
! $auth_class->user;
! $auth_class->group;
! $auth_class->is_admin;
! };
! $error_msg = $@;
}
! else {
! $error_msg = "Authentication cannot be setup! Please ensure 'auth' " .
! "is setup in your server configuration under 'system_alias'";
}
! return undef unless ( $error_msg );
!
! $R->send_html( $R->apache, $error_msg, $R );
! die OK . "\n";
}
***************
*** 455,459 ****
B<setup_authentication( $R )>: Authenticate the user and get the
! groups the user belongs to.
Return: nothing
--- 457,462 ----
B<setup_authentication( $R )>: Authenticate the user and get the
! groups the user belongs to, plus set for this request whether the user
! is an administrator.
Return: nothing
|