Browse Source

switching gorup permissions to pivot

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
cded1dc319
2 changed files with 3 additions and 8 deletions
  1. 1
    2
      generate.php
  2. 2
    6
      src/Auth/Business/LuticatePermissionsGroupsBusiness.php

+ 1
- 2
generate.php View File

@@ -48,8 +48,7 @@ $gen->setConfig(array("dbo" =>
48 48
     "mode" => 0775,
49 49
     "ignore" => array(
50 50
         "tables" => array(
51
-            "/luticate_users_groups/",
52
-            "/luticate_permissions_(groups|users)/"
51
+            "/luticate_users_groups/"
53 52
         ),
54 53
         "sp" => array(),
55 54
         "controllers" => array()

+ 2
- 6
src/Auth/Business/LuticatePermissionsGroupsBusiness.php View File

@@ -69,11 +69,7 @@ class LuticatePermissionsGroupsBusiness extends LuBusiness {
69 69
 
70 70
     public static function edit($group_id, $permission_name, $permission_value)
71 71
     {
72
-        $perm = self::checkPermissionGroupName($group_id, $permission_name);
73
-        if (is_null($perm)) {
74
-            self::badInput("Permission not found");
75
-        }
76
-        LuticatePermissionsGroupsDataAccess::edit($group_id, $permission_name, $permission_value);
77
-        return true;
72
+        self::del($group_id, $permission_name);
73
+        return self::add($group_id, $permission_name, $permission_value);
78 74
     }
79 75
 }

Loading…
Cancel
Save