| @@ 1003-1009 (lines=7) @@ | ||
| 1000 | * |
|
| 1001 | * @return void |
|
| 1002 | */ |
|
| 1003 | public static function checkAdminUser() { |
|
| 1004 | OC_Util::checkLoggedIn(); |
|
| 1005 | if (!OC_User::isAdminUser(OC_User::getUser())) { |
|
| 1006 | header('Location: ' . OC_Helper::linkToAbsolute('', 'index.php')); |
|
| 1007 | exit(); |
|
| 1008 | } |
|
| 1009 | } |
|
| 1010 | ||
| 1011 | /** |
|
| 1012 | * Check if it is allowed to remember login. |
|
| @@ 1037-1044 (lines=8) @@ | ||
| 1034 | * |
|
| 1035 | * @return null|boolean $groups where the current user is subadmin |
|
| 1036 | */ |
|
| 1037 | public static function checkSubAdminUser() { |
|
| 1038 | OC_Util::checkLoggedIn(); |
|
| 1039 | if (!OC_SubAdmin::isSubAdmin(OC_User::getUser())) { |
|
| 1040 | header('Location: ' . OC_Helper::linkToAbsolute('', 'index.php')); |
|
| 1041 | exit(); |
|
| 1042 | } |
|
| 1043 | return true; |
|
| 1044 | } |
|
| 1045 | ||
| 1046 | /** |
|
| 1047 | * Returns the URL of the default page |
|