File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -11,29 +11,36 @@ public function __construct() {
11
11
12
12
public function getAllRoles () {
13
13
// Devolver todos los roles
14
+ return $ this ->rolModel ->getAllRoles ();
14
15
}
15
16
16
17
public function getRoleByName ($ name ) {
17
18
// Devolver el rol con el nombre
19
+ return $ this ->rolModel ->getRoleByName ($ name );
18
20
}
19
21
20
22
public function addRole ($ data ) {
21
23
// Agregar un rol
24
+ return $ this ->rolModel ->addRole ($ data ['name ' ], $ data ['description ' ]);
22
25
}
23
26
24
27
public function updateRole ($ id , $ data ) {
25
28
// Actualizar un rol
29
+ return $ this ->rolModel ->updateRole ($ id , $ data ['name ' ], $ data ['description ' ]);
26
30
}
27
31
28
32
public function deleteRole ($ roleId ) {
29
33
// Eliminar un rol
34
+ return $ this ->rolModel ->deleteRole ($ roleId );
30
35
}
31
36
32
37
public function assignPermission ($ roleId , $ permissionId ) {
33
38
// Asignar un permiso a un rol
39
+ return $ this ->rolModel ->assignPermission ($ roleId , $ permissionId );
34
40
}
35
41
36
42
public function revokePermission ($ roleId , $ permissionId ) {
37
43
// Revocar un permiso de un rol
44
+ return $ this ->rolModel ->revokePermission ($ roleId , $ permissionId );
38
45
}
39
46
}
You can’t perform that action at this time.
0 commit comments