Answer the question
In order to leave comments, you need to log in
Yii how to check page availability?
Let's assume each user has a role. Roles correspond to page IDs. For external links, I made such a check (loaded into a frame). Before loading, I look at the haspage table (pivot table - role id, page id) record and, depending on this, I display it or not. But for internal links, I store a relative path like (site\index, page\admin) and so on. Would you like to make a blockpost.php thread so that when a request is made to any page, the role is checked, does it have rights to display?
Answer the question
In order to leave comments, you need to log in
So make a filter. Well, or in the beforeAction of the parent controller.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question