php-casbin/codeigniter-permission

AddNamedPolicies() not add authorization rules to the current named policy

igybb opened this issue · 1 comments

igybb commented

I have rules in array, E.g.:
$rules = [ ["editor", "/admin/dashboard/*", "GET"], ["editor", "/admin/users/edit*", "GET"] ];

Even though the function from ManagementApi $e->addPolicies($rules) returns True, does not add any rules.

For completion only:
If I use E.g. $e->addPolicy("editor", "/admin/dashboard/*", "GET"), the function returns True and the rule is added properly.

@igybb Codeigniter-permission does not support batch adding policies for the time being ,we will implement it as soon as possible .