2
I am separating the permissions in my application, I am using a custom authorization with the Authorize class, I can already separate permission by action and controller, I would like to know how to use only for code snippets, for example, in a page I have 2 Forms, each one appears depending on the permission?
That one
User
already gets the logged in user, or I have to pass it to view?– henriquedpereira
Already picks up the logged in user. It is automatically filled in by Controller.
– Leonel Sanches da Silva
I created a custom authorization
[MinhaAuth("TL001","TL002")]
and I’m trying to@if (User.IsInRole("TL002")){}
but it’s not going, there’s something else to do?– henriquedpereira
@Henriquedomingospereira I will have to expand the answer to customize the
RoleManager
. I’m just looking for references and already complete the answer.– Leonel Sanches da Silva
@Henriquedomingospereira
RoleManager
nay.UserManager
. I edited the answer.– Leonel Sanches da Silva