Ver código fonte

switching gorup permissions to pivot

tags/0.1.0
Robin Thoni 9 anos atrás
pai
commit
cded1dc319

+ 1
- 2
generate.php Ver arquivo

@@ -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 Ver arquivo

@@ -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
 }

Carregando…
Cancelar
Salvar