Spica Posted March 5, 2016 Share Posted March 5, 2016 I have some process Modules with own permission per module and assigned them to admin pages. Is it possible, to check by api if a user has access to one or all of these pages/processmodules? I only find how to check if a user has a certain permission. But what if I want to check generally if he has access, without knowledge of its permissions, e.g. to redirect to another page? Link to comment Share on other sites More sharing options...
Spica Posted March 6, 2016 Author Share Posted March 6, 2016 I now solved it like this //search the first viewable child and redirect public function ___execute() { $moduleChildren = $this->page->children; foreach ($moduleChildren as $modulechild) { if ($modulechild->viewable()) { $this->session->redirect($modulechild->url); return; } } } 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now