static function is_role($user_id, $context)
 {
     if (!parent::is_role($user_id, $context)) {
         return false;
     }
     if ($context instanceof unternehmens_context) {
         return $GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->isCustomerAdmin($user_id);
     }
 }
예제 #2
0
 static function is_role($user_id, $context)
 {
     if (!parent::is_role($user_id, $context)) {
         return false;
     }
     $admin_group = steam_factory::get_group($GLOBALS["STEAM"]->get_id(), "Admin");
     $user = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $user_id);
     if ($admin_group->is_member($user)) {
         return true;
     } else {
         return false;
     }
 }
예제 #3
0
 static function is_role($user_id, $context)
 {
     if (!parent::is_role($user_id, $context)) {
         return false;
     }
     if ($context instanceof kurs_context) {
         $course_group_id = $context->get_context_object();
         $course_group = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $course_group_id);
         $course_group_staff = steam_factory::get_group($GLOBALS["STEAM"]->get_id(), $course_group->get_groupname() . ".staff");
         $user = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $user_id);
         if ($course_group_staff->is_member($user)) {
             return true;
         } else {
             return false;
         }
     }
 }