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
16
votes
2 answers

PHP login class

I'm looking for a good PHP login class via MySQL, and I'm not yet completely satisfied with anything I've found. This prior SO question doesn't really address my needs, as I'd prefer to stay away from PEAR and CodeIgniter, and just have a simple and…
Mike
  • 4,542
  • 1
  • 26
  • 29
15
votes
2 answers

Dynamically adding roles to a user

We are using Symfony2's roles feature to restrict users' access to certain parts of our app. Users can purchase yearly subscriptions and each of our User entities has many Subscription entities that have a start date and an end. Now, is there a way…
maiwald
  • 891
  • 12
  • 26
14
votes
3 answers

Wordpress Role Custom Capability is set true but returns false

I try to create a user role with some custom capabilities. That works so far. But if I want to check the user permissions of one specific capability with the function current_user_can() it returns false. But inside the capabilities array of the new…
kindisch
  • 766
  • 1
  • 7
  • 23
11
votes
4 answers

Role Management in MVC3

I want to add a functionality to application such that only admin can create users and he can provide access to particular pages to user. He can create roles and can provide users different roles. I am using Visual Studio 2010 and building this…
summercostanza
  • 285
  • 1
  • 2
  • 12
11
votes
3 answers

How to add custom user roles for a GitHub organisation?

There are two default user roles in an organization on GitHub: "admin" and "member". How to introduce a further role and configure its access rights?
automatix
  • 14,018
  • 26
  • 105
  • 230
10
votes
3 answers

Best way to store user permissions?

Designing a fairly complicated site with a lot of ajax running on a single page. I have reached the point where some user's need to have specific permission to do things and some need to be stopped from the action. I have set up user roles in my…
Capt Otis
  • 1,250
  • 1
  • 12
  • 18
10
votes
2 answers

Case insensitive check for role in HttpServletRequest

The javax.servlet.http.HttpServletRequest class has a method called isUserInRole. I use this to check if a user has, for example, the admin role. However, that method is case sensitive. So, if the role in the request was Admin or ADMIN, then…
Andrew Mairose
  • 10,615
  • 12
  • 60
  • 102
10
votes
2 answers

Managing users/roles/groups in FOSUserBundle

I am developing a simple CRUD to manage users/roles/groups of the application in which I am working. To manage users I'm using FOSUserBundle. What I want to do can be accomplished in several ways: Assigning roles to groups and then assign users to…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
9
votes
1 answer

Symfony2 FOSUserBundle Role entities

I'm currently trying to figure out the best way to implement doctrine persisted Role entities as a M2M relationship compatible with FOSUserBundle. Previously I was using just strings with the default implementation and was persisting it with a…
jmoz
  • 7,846
  • 5
  • 31
  • 33
9
votes
1 answer

How can you run a GIT container as the current user?

I want to use GIT from within a Docker container. The usage as documented on https://hub.docker.com/r/alpine/git/ is quite simple: docker run -it --rm -v ${HOME}:/root -v $(pwd):/git alpine/git clone ... This works. One big downside of this is…
user8870331
9
votes
4 answers

User roles schema on Django

A great greetings community My question is related with the kind of manage users and the schema users in Django, In beginning I ask to you apologize just in case that my questions can will be too "newbies" or without sense, I am starting to related…
bgarcial
  • 2,915
  • 10
  • 56
  • 123
9
votes
1 answer

Get Active Directory Administrators using Azure AD Graph Client

Using the Azure Active Directory Graph Client, I can successfully query the AD for its user roles with the ff. code: var activeDirectoryClient = new ActiveDirectoryClient(); // Instantiate the Graph Client here. var adRoles = await…
miguelarcilla
  • 1,426
  • 1
  • 20
  • 38
9
votes
5 answers

Symfony2 Get User Role in Twig

I have one question, How can i get User role in Symfony2 Twig. I Had looking around but I couldn't find it. Please help, or clue.. Thanks before. Hendrawan
hendra1
  • 1,359
  • 1
  • 15
  • 24
9
votes
2 answers

How to setup initial user/role enabling SAML SSO

We are a service provider. Suppose in our application, we originally have our own user/role management. Different users with different roles are allowed to use different features. So that when a user login we need to know which roles this user has,…
8
votes
2 answers

Need suggestions on using Entrust roles in a single resource controller - Laravel5

I am working on a control panel app where i have several user roles like globaladmin, editors etc. Now i want to use these roles with a single UserController Resource. For example globaladmins should be able to perform all Restful methods, while an…
Omer Farooq
  • 3,754
  • 6
  • 31
  • 60
1
2
3
62 63