Browse Source

permissions get all

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
daa8c22870

+ 2
- 0
src/Auth/Business/LuticateBusiness.php View File

92
 
92
 
93
         $route->get("$prefix/permissions/$permission_name", "${ns}LuticatePermissionsController", "get",
93
         $route->get("$prefix/permissions/$permission_name", "${ns}LuticatePermissionsController", "get",
94
             LuticatePermissions::PERM_GET);
94
             LuticatePermissions::PERM_GET);
95
+        $route->get("$prefix/permissions", "${ns}LuticatePermissionsController", "getAll",
96
+            LuticatePermissions::PERM_GET);
95
         $route->post("$prefix/permissions/add/$permission_name/$permission_value", "${ns}LuticatePermissionsController",
97
         $route->post("$prefix/permissions/add/$permission_name/$permission_value", "${ns}LuticatePermissionsController",
96
             "add", array(LuticatePermissions::PERM_ADD, LuticatePermissions::PERM_GET));
98
             "add", array(LuticatePermissions::PERM_ADD, LuticatePermissions::PERM_GET));
97
         $route->post("$prefix/permissions/$permission_name/del", "${ns}LuticatePermissionsController", "del",
99
         $route->post("$prefix/permissions/$permission_name/del", "${ns}LuticatePermissionsController", "del",

+ 11
- 0
src/Auth/Controller/LuticatePermissionsController.php View File

45
         return LuticatePermissionsBusiness::get($permission_name);
45
         return LuticatePermissionsBusiness::get($permission_name);
46
     }
46
     }
47
 
47
 
48
+    /**
49
+     * Get all permissions
50
+     * @param int $page The page number, 0 based
51
+     * @param int $perPage The number of items per page
52
+     * @return \Luticate\Utils\LuMultipleDbo
53
+     */
54
+    public function getAll($page = 0, $perPage = PHP_INT_MAX)
55
+    {
56
+        return LuticatePermissionsBusiness::getAll($page, $perPage);
57
+    }
58
+
48
     /**
59
     /**
49
      * Add a permission
60
      * Add a permission
50
      * @param $permission_name string The permission name
61
      * @param $permission_name string The permission name

Loading…
Cancel
Save