You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Allow and Deny can be each set$deputy->set_role('user', array
(
'allow' => array
(
'forum',
'forum/thread'
),
'deny' => array
(
'forum/thread/edit'
)
));
var_export($deputy->allowed('forum')); // returns 'false'.
Is it supposed to be that way?
The problem is 'forum/thread/edit' breaks down as 'forum' => 'thread' => 'edit' and due to weird parse algorithm as soon as we get down to 'forum' while looking into 'deny' rules _get() function does return TRUE, which means it is in 'deny' list even thou it isn't.
The text was updated successfully, but these errors were encountered:
Great find! When denying a child, Deputy_Role was taking into account the parent as well. I refactored this logic to explicitly look for the URI before checking for a wildcard.
Is it supposed to be that way?
The problem is 'forum/thread/edit' breaks down as 'forum' => 'thread' => 'edit' and due to weird parse algorithm as soon as we get down to 'forum' while looking into 'deny' rules _get() function does return TRUE, which means it is in 'deny' list even thou it isn't.
The text was updated successfully, but these errors were encountered: