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
5
votes
1 answer

Drupal: How to implement a SECOND admin with fewer rights than the normal and own theme?

I'm currently trying to realize a second (lower) admin layer in drupal. I have made an extra section via the module of the same name for those users so they can have their own theme etc. I want to give these second or lower admins a menu in their…
H. Walter
  • 51
  • 2
5
votes
1 answer

How to implement role-based access control Java/MySql?

I am planing to start a web-based project that involves user registrations just like forums/CMS, but my barrier is that I have not idea how to implement the so-called role-based access control. I googled for "role-based access control" and I found…
malhobayyeb
  • 2,725
  • 11
  • 57
  • 91
4
votes
1 answer

Symfony ApiPlatform: Role as Serializer/Groups in Entity is good idea?

I have many roles in the app, incl. super_admin, admin, user, moderator, editor ... I want to use apiPlatform and display appropriate fields in entities appropriately for roles, I also made additional classes converting roles into classes.…
ciastekkkk
  • 89
  • 7
4
votes
0 answers

Implement KeyCloak Role Storage and Role Mapping over external Database

I have a requirement of implementing KeyCloak over external Database and should be able to CRUD users and roles and along with mapping/assigning them. I also able to develop CRUD Users using User Storage SPI, but was unable to find any content…
KNDheeraj
  • 834
  • 8
  • 23
4
votes
2 answers

MVC 3 ASP.NET Roles-Authorize Attribute

I am getting user roles from Active Directory and I am binding the same roles to ASP.NET Membership Roles. I want to control the display for the various Views in Controller by using [Authorize(roles="Admin")] But Which ever role I specify, The View…
Hari Gillala
  • 11,736
  • 18
  • 70
  • 117
4
votes
2 answers

Where should I put query logic related to filtering data by role user in DDD architecture

I am following DDD architecture for my app. I have App layer, domain layer and data access layer(repository). Let say I would have 3 roles in my app: admin, supervisor, agency. Every role should access data that assigned to itself. So the problem…
4
votes
4 answers

How can I allow port-forwarding for a specific deployment in Kubernetes?

I am trying to allow some users in my org to forward ports to our production namespace in Kubernetes. However, I don't want them to be able to forward ports to all services. I want to restrict access to only certain services. Is this possible? kind:…
VBoi
  • 349
  • 5
  • 21
4
votes
1 answer

Extract roles from REST API in Keycloak

At my company, we need to extract the roles of the logged in user from the REST API that Keycloak provides. We have looked through the Keycloak documentation but can't find the answers we are looking for. Let me explain the flow we want to…
Pål
  • 81
  • 2
4
votes
1 answer

Apply a discount for a specific user role in Woocommerce

I have a woocommerce store, with 3 user roles, I want to provide a 10% discount on the cart total only for a user role 'company'. I found "Percentage discount based on user role and payment method in Woocommerce" answer that is very neer of what I…
fafchook
  • 819
  • 1
  • 13
  • 17
4
votes
4 answers

Setting up a user / roles management system - with multi-tenancy

Does anyone have any schema's, data models, or suggestions for creating a user / roles management system that accounts for multi-tenancy. For example, a user in organization A, may be assigned a role to a certain project, to a certain application,…
Michael Armstrong
  • 371
  • 1
  • 5
  • 16
4
votes
1 answer

Additional user role select field in Woocommerce registration

. A user role selection is needed in WooCommerce registration form. Users should have a pull down menu to select between "customer" and "reseller" (IDs) wordpress role. Unfortunately my attempt to assemble code fails. The following code does not…
John
  • 130
  • 1
  • 8
4
votes
0 answers

Integrate RBAC in Spring security

I config Spring Security in my web application by this example: http://www.baeldung.com/role-and-privilege-for-spring-security-registration and this http://www.baeldung.com/spring-security-create-new-custom-security-expression! I have some…
4
votes
1 answer

Disable tax programmatically for a specific user role

In my woocommerce web site, I have enable Tax in general WooCommerce settings. I would like to disable tax for a specific user role programmatically ( with any hooks ), from my shop, checkout page and from order email. How could I achieve…
Simanto
  • 51
  • 1
  • 5
4
votes
1 answer

Get all users and roles in Java webapp

Questions: Is there a concept of user & role that is general to Servlet Containers? If so, is there a container agnostic way to access those users and roles? If not, is there a way to access Tomcat Realm users & roles? Background: I would like to…
Sean Connolly
  • 5,692
  • 7
  • 37
  • 74
4
votes
3 answers

Laravel 5 and Entrust. How to save user and attach role at the same time

Has anyone tried Entrust for User Roles & Permissions in Laravel 5? I want to add and save user and attach role into it at the same time. here's my code $role = Role::where('name','=','admin')->first(); $user = new User(); $user->name…
Nick
  • 41
  • 1
  • 1
  • 2