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

Adding a company to users in ASP.NET MVC structure

I've been reading about and playing with ASP.NET MVC lately, to figure out if it will be the new framework for an exisiting product. The product consists of a multi-user website where the customers are created by me and added to their respective…
David K
  • 3,153
  • 5
  • 18
  • 27
0
votes
1 answer

IsUserInRole method is not working properly

Following 'if' condition is not working i.e. Roles.IsUserInRole(User.Identity.Name,"teacher") is not returning anything (it is returning zero). what should I do to make it work? Requirement is to display different pages to users register as teacher…
NN796
  • 1,247
  • 11
  • 31
0
votes
1 answer

How not to make a db call for checking user role in php?

I know the standard way to check user roles mostly like if(isUserAuthorizedForTheOperation(userId)) in PHP which is create a db and for every user check the db and find out.Now this adds to immense performace issues.For every hit in my .php file,I…
a YUY
  • 87
  • 9
0
votes
1 answer

Custom Role Provider - {"The connection was not closed. The connection's current state is connecting."}

I've implemented a Custom Role Provider in my MVC application but when multiple simultaneous Authorize requests are made I get the following error {"The connection was not closed. The connection's current state is connecting."} this happens on the…
0
votes
2 answers

Entity Framework Identity - Duplicate UserId in UserLogin

I'm extending all the Identity tables. Every thing is working well, but in the database UserLogin gets an extra column named User_Id. modelBuilder.Entity().ToTable("User"); modelBuilder.Entity().ToTable("UserRole"); …
P Lysenius
  • 1,133
  • 1
  • 13
  • 25
0
votes
1 answer

Guest, admin and Owner roles in PHP (Laravel) project

I'm building a Laravel application. I need to discriminate between a guest, an admin and an owner. I plan on using Confide and Entrust. Let me give the example with a todo-application: First part of the question: The guest can only access the…
wiwa1978
  • 2,317
  • 3
  • 31
  • 67
0
votes
1 answer

How to use Authority package for Laravel

After some searching, I succesfully installed the Authority-l4 package to use for my Laravel project. The docs are clear but small (not much info/examples). This is what my config file looks like atm: return array[ 'initialize' =>…
JasonK
  • 5,214
  • 9
  • 33
  • 61
0
votes
1 answer

How can I disable the view of a page for other users?

I want that a user of my application to enable or disable the viewing of a certain page for other users. For that i need , somehow an application variable, a bool to be set true or false whether the user decides to enable or disable the view for…
Stefan P.
  • 331
  • 6
  • 23
0
votes
1 answer

Working with custom role in VB.NET win application

I am looking for ways to implement custom user-roles in windows application with vb.net. I got a database table called Roles with Administrator and User entries. User cannot see some of the form data. In ASP.NET MVC we can do like. [Authorize(Roles…
fireBand
  • 947
  • 7
  • 23
  • 42
0
votes
1 answer

adding custom role filter to wordpress woocommerce shop_manager

Hello all i was wondering if someone could help me out. I would like to add a cap to the woocommerce shop manager role. I found this function but it will not work. function add_capability() { // gets the author role $role = get_role(…
har
  • 43
  • 10
0
votes
1 answer

How to get user roles using query in jsp?

i am new in java i want role based access using switch statement but when i execute query and provide user role for example(user or admin) then user log-in well but if i leave (role='') empty in query then query not execute so well and jump in else…
Bala jeet
  • 5
  • 3
0
votes
1 answer

Symfony2, Sonata. Update roles without logout

Need to update the role of the user without logout. I'm using sonata admin bundle: class CompanyAdmin extends Admin { ... public function postPersist($company) { $this->checkCompanyAdmin($company); } ... protected function…
PuLWaR
  • 1
  • 3
0
votes
1 answer

Implementing Table relationships where there are both pre-determined and custom user roles in db

I am working on a database design to implement user roles in Oracle 11g database. The relationship is many-to-many but what is different in this setup is that a user can either have a specific user type (admin, user, etc) with a pre-determined set…
RMK
  • 456
  • 2
  • 9
  • 19
0
votes
1 answer

how to customize publish action - sitecore

I created a user in sitecore with 2 roles assigned to him i.e author and publisher When this user who is both author and publisher creates any content he shouldn't be able to publish it. Can i overwrite the publish action? check on the user who…
Newbie
  • 361
  • 2
  • 15
  • 33
0
votes
0 answers

Update _Layout for different type of users

I'm using the MVC template on Asp.net MVC 4, and I have a UserProfile(t class with the UserType(this field receive only 2 values, "Ouvinte" and "Musico") field, that works like roles in application, right? My idea is, make a verification on…