Ejemplo n.º 1
0
 public static function getRolesByPermission($permission)
 {
     $roles = permission::getAllRoles();
     $roles_edit = array();
     foreach ($roles as $key => $role) {
         if (Permission::checkPermissionByPermission(pow(2, $role), $permission)) {
             $roles_edit[] = $role;
         }
     }
     return $roles_edit;
 }