Moved CAS configuration from config file to sysprefs
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Thu, 30 Apr 2009 09:04:21 +0000 (11:04 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 23 Nov 2009 15:23:20 +0000 (16:23 +0100)
C4/Auth.pm
C4/Auth_with_cas.pm

index e1d8003..b84e40d 100755 (executable)
@@ -43,7 +43,7 @@ BEGIN {
     @EXPORT_OK = qw(&check_api_auth &get_session &check_cookie_auth &checkpw &get_all_subpermissions &get_user_subpermissions);
     %EXPORT_TAGS = (EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)]);
     $ldap = C4::Context->config('useldapserver') || 0;
-    $cas = C4::Context->config('usecasserver') || 0;
+    $cas = C4::Context->preference('casAuthentication');
     if ($ldap) {
         require C4::Auth_with_ldap;             # no import
         import  C4::Auth_with_ldap qw(checkpw_ldap);
index 694cbbb..8298dc7 100644 (file)
@@ -37,7 +37,7 @@ BEGIN {
 
 
 my $context = C4::Context->new()       or die 'C4::Context->new failed';
-my $casserver = C4::Context->config("usecasserver") or die 'No "usecasserver" in KOHA_CONF: ' . $ENV{KOHA_CONF};
+my $casserver = C4::Context->preference('casServerUrl');
 
 sub logout_cas {
     my ($query) = @_;