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

How to protect admin area from users by role in laravel 5.6?

I was looking for simple Laravel 5.6+ version roles and users solution. I want to have one users table. So I added user_type in my table as string in $table->enum('role', ['admin', 'user']); Which files should I create or update to protect…
Aipo
  • 1,805
  • 3
  • 23
  • 48
0
votes
1 answer

Limit page creations by user role functions.php

Is it possible to create a function via functions.php that restricts users from creating pages based on their user role? So for example, users with the user role "limited" can only create 5 pages. When they reach this amount, the "Create new page"…
user2812779
  • 193
  • 3
  • 19
0
votes
1 answer

WSO2 APIM: How to implement "Design first" pattern? (Developers cannot test)

We are using WSO2 API 2.1.0 to deploy our business APIs. Until now, we can follow, without problems, the pattern "Code first" for existing APIs. For example, we have an existing API REST in C#/NetFramework. In this case: - Developer install a…
Sourcerer
  • 1,891
  • 1
  • 19
  • 32
0
votes
1 answer

ASP.NET MVC: Display user's role

In order to show the name of the user, I use the following: @HttpContext.Current.User.Identity.Name Now, I'm having troubles when it comes to display the role name of the user as i don't know how to do it.
Navas
  • 39
  • 1
  • 2
  • 8
0
votes
1 answer

Add user role on user edit page Drupal 8

Website on Drupal 8. I have a form for editing the user (on url: user/{user}/edit), I added two checkboxes there, the first checkbox is the driver role, and the second checkbox role is the passenger (for example). I want that when the user selects…
Jerzy Stuhr
  • 63
  • 2
  • 7
0
votes
0 answers

There is no ViewData item of type 'IEnumerable' but it registers the user

I'm creating a way for Admin to create users and assign roles and even create new roles that will be available to choose from when creating users. I get this error when creating a user System.InvalidOperationException: 'There is no ViewData item…
0
votes
1 answer

Add/update user_meta on change of role

I'm trying to save the current date as user meta when the role of a user is changed. I'm having no joy with this code but can't see where I am going wrong. Any pointers much appreciated! function user_role_update( $user_id, $new_role ) { …
lsloss
  • 45
  • 8
0
votes
1 answer

Web App Topic on USER ROLES

I'm currently working on a web-App using Glass-Fish and Servlet although I am a bit confused on the logic concept on how to handle the different HTML content for each user Role such as Admin, Instructor and Client. Lets consider that we have those…
Loizos Vasileiou
  • 674
  • 10
  • 37
0
votes
2 answers

Wordpress new folder and file permissions are not correct

I have read through a bunch of sites, but I could only find the right permission to set to existing files and folders, but I could not find anything related to the new files and folders to be created. Whenever I create a new file or folder they will…
0
votes
1 answer

flask - administering user roles

I have a website where a user can have multiple roles (usually a user will have multiple roles). What I am trying to do is simply add and remove user roles. The html side is pretty simple. I have a select 2 multiselect box that loads all the…
Jeff Bluemel
  • 476
  • 9
  • 22
0
votes
1 answer

How to set user access by toolStripMenueItem in C# WinForm

I want to add in My project that admin can set access control to user. Suppose admin can select user name and module name and save it to database. When user successfully logged in he can only show the specific toolstripMenueItem which are added by…
0
votes
1 answer

Ansible: How to create uid's within certain range

I am currently working on a host where i have installed ansible. I have created 2 application accounts with groups with nologin and within that groups i want to add users, so that every department has their own ansible directory. My vars look like…
0
votes
1 answer

Read Windows Logged in User to understand role

I want to know the best way to implement it. I have a asp.net web app which does not have any login page/options. But I need to populate different options in the web page based on User roles (admin, Member etc..). How can I know what is the role of…
0
votes
2 answers

how to switch between roles in spring-security

I was struggling for days on how can I implement a switch between roles with one userAccount within a Spring Boot application via Spring Security. There is an example in my case: I have a class [UserAccount]{Id,username,password,isActive} and…
0
votes
2 answers

asp.net web api role based authentication custom attribute check if user in role

I was seeking on the internet a bit, but couldn't find exactly what I meant... Could you please elaborate what exactly I'm doing wrong here and how can I actually accomplish what I need? Issue explained in code comment just below multiple…