Пример #1
0
 /**
  * Determine whether the current user can delete users.
  * @return bool Whether the user has permission or not
  */
 public function can_do_delete()
 {
     $contexts = bulkuserpage::get_contexts('local/elisprogram:user_delete');
     return !$contexts->is_empty();
 }
Пример #2
0
 function can_do_default()
 {
     //this allows for cluster role assignments to be taken into account
     $contexts = bulkuserpage::get_contexts('block/curr_admin:user:edit');
     return !$contexts->is_empty();
 }