Base solution for your next web application
Open Closed

Need grant permission for specific pages #11562


User avatar
0
attspacecom created

How to give specific page permission for "Member" i created in HostRoleAndUserCreator? want to achieve this by adding in seed


4 Answer(s)
  • User Avatar
    0
    attspacecom created

    Help on this asap please. Thank you

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Probably I couldn't understand the question bery well but if you want to grant permisison for a specific user, you can use _context.UserPermissions and insert necessary permisison.

  • User Avatar
    0
    attspacecom created

    Hi,

    Probably I couldn't understand the question bery well but if you want to grant permisison for a specific user, you can use _context.UserPermissions and insert necessary permisison.

    I dont want to grant permission for a specific user.

    I want to grant permission for a specific ROLE. i want to do this in Seed function. Can guide me on this?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    In that case, you can insert a new record to _context.RolePermissions, this should grant a permission to a given role.