]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/UserRepo.php
Merge branch 'master' into translations
[bookstack] / app / Repos / UserRepo.php
index 127db9fb59c482aab05198277558bf7b6abdcac6..22c92f3cea1b8e16f18244eb417be8b040deeaf3 100644 (file)
@@ -3,7 +3,6 @@
 use BookStack\Role;
 use BookStack\User;
 use Exception;
-use Setting;
 
 class UserRepo
 {
@@ -199,9 +198,9 @@ class UserRepo
      * Get the roles in the system that are assignable to a user.
      * @return mixed
      */
-    public function getAssignableRoles()
+    public function getAllRoles()
     {
-        return $this->role->visible();
+        return $this->role->all();
     }
 
     /**
@@ -211,7 +210,7 @@ class UserRepo
      */
     public function getRestrictableRoles()
     {
-        return $this->role->where('hidden', '=', false)->where('system_name', '=', '')->get();
+        return $this->role->where('system_name', '!=', 'admin')->get();
     }
 
 }
\ No newline at end of file