Role based page access unable to check two roles as same time

Ali Khan asked on January 27, 2024 15:45

In my application I set multiple roles Student, Teacher etc

Student has two roles at same time( Student and Teacher) so Teacher can access all the pages but Student as some pages access only.

In my widget I am getting all the pages using below code with CheckPermissions().

But CheckPermission method not allowed to check both roles at same time. Any idea?

_pageRetriever.Retrieve

Recent Answers


Juraj Ondrus answered on January 29, 2024 07:02

I would try using IsUserAuthorizedToAccess to evaluate whether the user is allowed/authorized to access the page. See the documentation for more details.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.