0

Basically i want to do this IMGUR

[Authorize(Roles = "Admin" )] <= Currently it's like this.
[Authorize(Roles = "Admin","SuperAdmin" )] <= I want to make it like this.

Basically i want to assign 2 identity roles at once to the same Controller,but I'm not sure how to format it properly. I made 2 identity roles, Admin and SuperAdmin, so i want SuperAdmin to be able to access everything that Admin can, so that's why i need to assign 2 identity roles on the same stuff.

  • please explain your question instead of sending the readers to links to figure out the problem – Ibo Jul 11 '18 at 21:07
  • I literally couldn't be more specific. I perfectly explained what i want to achieve and i gave an image example. I don't understand what more information can i possibly provide.... – Jack Peeterson Jul 11 '18 at 21:10
  • If you wanted to include a snapshot etc, it is always recommended to use the embedded images since links break and the posts become useless or incomplete – Ibo Jul 11 '18 at 21:28
  • Possible duplicate of [Allow multiple roles to access controller action](https://stackoverflow.com/questions/700166/allow-multiple-roles-to-access-controller-action) – G_P Jul 12 '18 at 00:23

1 Answers1

1

Make it [Authorize(Roles = "Admin, SuperAdmin")]

Code_maniac
  • 270
  • 1
  • 4
  • 16