Questions tagged [user-roles]

A user role is a group of users that share the same privileges or permissions on a system. Use this tag for questions about how user roles work in a particular security framework, or questions about the implementation of user roles in your program.

A user role is a group of users that share the same privileges or permissions on a system. For example, a blog platform may define a group of platform admins and groups of blog admins, blog editors and blog readers.

The concept is linked to , as a user role is a group of users who share common user permissions. It is common that a system allows users to have several roles, the user then has the union of all the permissions of their roles.

Use this tag for questions about how user roles work in a particular security framework, or questions about the implementation of user roles in your program.

944 questions
6
votes
3 answers

Add role to User in Liferay programmatically

I need to assign roles to my Liferay's users when they log in the application. I have implemented all the logic in the 'authenticateByScreenName' method of a custom class that implements 'Authenticator'. Example code: public class ESBAuthenticator…
dgcipp
  • 339
  • 3
  • 17
6
votes
4 answers

Spring MVC Role and Permission to Admin

I am new in spring mvc , In my existing project , there is one admin and they have rights to update data , but now i need to create 2 new admin , admin1 and admin2 that can only see limited page when they login like: when admin login , they can see…
007
  • 115
  • 1
  • 13
6
votes
2 answers

Can't map roles to groups using ibm-application-bnd.xml

I'm trying to map user groups using ibm-application-bnd.xml. Put it into META-INF folder. On try to access secure page get next message: [08.05.15 17:42:21:242 MSK] 00000084 WebCollaborat A SECJ0129E: ... GET в null:/loginmodule/date/,…
Gregory
  • 413
  • 5
  • 16
6
votes
2 answers

Wordpress custom user roles with upload_files true but edit_post false, how can i delete and edit media?

I created a wordpress custom user with his capabilities: this user can only read, edit and delete posts of a custom post type ( called recipe ). I give to this user the role to upload file, because when user write a recipe post can add media to his…
Marco
  • 125
  • 7
6
votes
4 answers

ad user not able to login even on assiging sitecore\Sitecore Client Users role

I have integrated active directory module with sitecore, I am able to see the users from ad in sitecore user manager. Now i want to verify if the ad user can login to sitecore. I assigned sitecore\Sitecore Client Users role for the user and tried to…
Newbie
  • 361
  • 2
  • 15
  • 33
6
votes
3 answers

How to get the ID of Roles for which a user is enrolled in MVC 5

I am trying to get an IList of roles in which a user is currently enrolled. Now in the Usermanager class I see there is a function call IList usersRoles = userManager.GetRoles(id); But it just returns the name of the Role as…
Zapnologica
  • 22,170
  • 44
  • 158
  • 253
6
votes
1 answer

HttpServletRequest isUserInRole() - How to get full role list?

HttpServletRequest isUserInRole() method will return a boolean value based on whether the role is present or not. Now if it is doing that it should have the full role list for the logged in user somewhere. How do I get that full role list?
Deena
  • 297
  • 2
  • 7
  • 17
5
votes
1 answer

What's a clean/DRY way to show available operations on user content?

Working on an ASP.NET MVC 3 (Razor) application, that's mainly concerned with UGC (user generated content). I'm working on a "Q&A" area - where users can ask questions, others can answer, vote, etc. As such, i'm trying to figure out a clean way to…
RPM1984
  • 72,246
  • 58
  • 225
  • 350
5
votes
0 answers

Laravel passport send dynamic token scopes in oauth/token API

I have user_master table, role_master table and a child table called user_roles which have references of user id and role id which indicates which user belongs to which role. I have one more permission table which indicates which permissions belong…
Ravi Maniyar
  • 661
  • 2
  • 7
  • 22
5
votes
2 answers

Symfony 4 - Define custom user roles from DB

I am learning Symfony 4, and I am lost with user roles and I don't know where to start. Because it will be an intranet like website Users will not register themselves, the admin will register them and set the role. The admin can also create new…
user4112557
5
votes
3 answers

Unit Test(mvc) -problem with Roles

I have mvc application and I'm working with poco objects and writing unit test. Problem is that all my test fail when they reach this line of code Roles.IsUserInRole("someUser", "role"). Should I implement new interface or repository for Roles…
Cipiripi
  • 1,123
  • 5
  • 17
  • 33
5
votes
1 answer

Query Database for Role Authorization Before Each Action in ASP.NET Core

ASP.NET Core combined with Identity already provide a simple way to check roles once after login, but I would like to query the database for the current roles for the current user before every controller action. I've read up on Role-based,…
5
votes
1 answer

AspNetUserRoles not in EDMX when generating from database

I have did some searching around on this issue and have come across a few questions in regards to AspNetUserRoles not being in the EDMX designer when generating from the database. However its in the ModelBrowser and I can't get this table to show up…
Chris
  • 2,953
  • 10
  • 48
  • 118
5
votes
3 answers

How do I hide WooCommerce products with a given category based on user role

I have a client with the following issue: I need to be able to split their WooCommerce WordPress site into essentially two categories. If a user is logged in as a "Wholeseller", only products in the "Wholesale" category get pulled from the database.…
Okomikeruko
  • 1,123
  • 10
  • 22
5
votes
1 answer

ASP.net Identity 2.1 Get all users with roles

How can I get a list of users including the role name per user? My app has the default tables of an MVC Project. I'm able to retrieve all users using Identity 2.1 like this: Model public class GetVendorViewModel { public IList
DavidH
  • 63
  • 1
  • 4