-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roles Nested Groups #202
Comments
After some digging appears to be a bug. "is" appears it needs to be a string in which the second "is" group needs to overwrite the first since it returns both route groups. Thanks |
As a workaround I have done the following if anyone else needs until there's an official release. Middleware\HasPermission.php - Line 172 from /**
* Extract required action from requested route.
*
* @param string $key action name
* @return string
*/
protected function getAction($key)
{
$action = $this->request->route()->getAction();
return isset($action[$key]) ? $action[$key] : false;
} to /**
* Extract required action from requested route.
*
* @param string $key action name
* @return string
*/
protected function getAction($key)
{
$action = $this->request->route()->getAction();
if (! isset($action[$key])) {
return false;
}
$roles = (array) $action[$key];
return end($roles);
} |
@mybigman can you please post a PR for the fix? Thanks also, wouldnt this work?
Also, i dont recall if |
Hi,
Having an issue with route group protection on nested groups.
If I remove "|fast.admin" from the ADMIN group I can access the admin page but with it there its permission denied. It doesn't matter what additional roles I add it's still permission denied.
Expected result is all three user roles can access the frontend but ONLY the two roles should access the backend.
Here's a dump of the router with "|fast.admin" removed.
Bug or user error :)
Thanks.
The text was updated successfully, but these errors were encountered: