KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Using Authorize attribute i may specify roles which is allowed to access the resources. [Authorize(Roles="User")] But if i have admin user which is allowed to go to any resource i need specify this one as well [Authorize(Roles="User, Administrator")] But may be there is some way i can say somehow that Administrator allowed to go anywhere and not to specify this one in Authorize attribute? So i mean if somewhere in code( on controller or on action ) would be this [Authorize(Roles="User")] it means that Administrator role allowed to go there as well. Or may be i may set it to all Authorize roles dynamically how when application start? Any ideas? UPDATED: Currently i have one admin controller with Authorize attribute [Authorize(Role="Administrator")] and i have some actions in some another controllers with attributes [Authorize(Role="User")] so i will need to add "Administrator" there as well if i didn't find better solution.
Tags (comma-separated)
Save Edits
Cancel