/** * 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(); }
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(); }