summaryrefslogtreecommitdiffstats
path: root/inc/user.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r--inc/user.inc.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index fe43abe..6e3c06d 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -86,12 +86,8 @@ class User
public static function isAdmin()
{
- // TODO: Not hardcoded; per Institution...
- return in_array(self::getShibId(), array(
- '5fb22037697816a70a847d15245c9f88',
- '94e48d34587ab9963a2013ddc97e1e45',
- 'fb91f270a95a5b006be916f2b2da305c',
- ), true);
+ // TODO: per Institution...
+ return in_array(self::getShibId(), unserialize(CONFIG_ADMINS), true);
}
/**
@@ -155,9 +151,9 @@ class User
if (empty($_SERVER['persistent-id'])) {
if (Session::getUid() === false) {
if (!empty($_SERVER['Shib-Session-ID'])) {
- Message::addError('Sie haben sich erfolgreich mittels bwIDM authentifiziert,'
+ Message::addError('Sie haben sich erfolgreich mittels {{0}} authentifiziert,'
. ' aber der IdP Ihrer Einrichtung scheint die benötigten Metadaten nicht'
- . ' an den bwLehrpool-SP zu übermitteln. Bitte wenden Sie sich an den Support.');
+ . ' an den {{1}}-SP zu übermitteln. Bitte wenden Sie sich an den Support.', CONFIG_IDM, CONFIG_SUITE);
}
Session::delete();
return false;
@@ -204,7 +200,7 @@ class User
|| strpos(";{$_SERVER['affiliation']}", ';staff@') !== false
|| strpos(";{$_SERVER['affiliation']}", ';faculty@') !== false))
self::$user['role'] = 'TUTOR';
- elseif (isset($_SERVER['entitlement']) && strpos(";{$_SERVER['entitlement']};", ';http://bwidm.de/entitlement/bwLehrpool;') !== false)
+ elseif (isset($_SERVER['entitlement']) && strpos(";{$_SERVER['entitlement']};", CONFIG_ENTITLEMENT) !== false)
self::$user['role'] = 'TUTOR';
else
self::$user['role'] = 'STUDENT';