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

Wordpress if current users is

I have the following a function in my functions.php: function admin_style() { global $user_ID; if ( current_user_can( 'shop_manager') ) { wp_enqueue_style('admin-styles',…
Michel
  • 47
  • 1
  • 7
0
votes
1 answer

MongoDB How to create a User with ReadWriteAnyDatabase role but exclude the admin database

I'm trying to create an extended role that allows - read/write on any database - allow collMod on any database - allow createCollection on any database - readonly on admin database I tried the following use admin db.runCommand({ createRole:…
user7887107
  • 45
  • 2
  • 7
0
votes
0 answers

User Role management - null reference exception in Account Controller

I found a question that is very similar to mine. MVC5 Account Controller null reference exception I was going to just comment on that question and ask this, but alas I don't have enough points to comment. This is my RoleController [HttpPost] …
Jules Mena
  • 67
  • 8
0
votes
2 answers

Can't check if a role is granted

I've to set dynamic role to an user when he logs in, so I've created a service LoginSuccessHanlder with this function on login success : public function onAuthenticationSuccess(Request $request, TokenInterface $token) { $response = null; …
Simon M.
  • 2,244
  • 3
  • 17
  • 34
0
votes
1 answer

menu display as per user

I have form with menus that are created dynamically from the tables in data base . as follows public void FourthMenu(ToolStripMenuItem mnu, string submenu) { string Seqchild = "SELECT FRM_NAME,FourthMenuID FROM MNU_FOURTH WHERE…
speedyraz
  • 335
  • 1
  • 5
  • 18
0
votes
1 answer

Setting Meteor user roles in fixtures not working

I have a Meteor application with the following fixtures code: /imports/startup/server/fixtures.js import { Meteor } from 'meteor/meteor' import { Accounts } from 'meteor/accounts-base' if(Meteor.users.find().count === 0) { const users = [ …
Barry Michael Doyle
  • 9,333
  • 30
  • 83
  • 143
0
votes
1 answer

How to create user with ROLE_API_ACCESS in Sylius?

I followed the official rest-api documentation of sylius but couldn't create the user with field user[authorizationRoles]. Since role_user is default role, i provided arrays of roles as mentioned in docs like this POST…
0
votes
1 answer

Hide Custom Checkout Fields on WooCommerce Based on User Role

I've created a user role of CSR and several custom checkout fields to appear on the Checkout page of WooCommerce, and I want to hide these checkout fields from any other user but those with the CSR role. I've created the fields and the role, but…
0
votes
0 answers

Don't allow users with the editor role to select themselves in the ACF user field

I am currently working on a project that has the ACF user field. However I want to edit the field so that if the user has an editor role, then they cannot select themselves from the user field. However I do want them to have the ability to select…
Mat Teague
  • 147
  • 2
  • 3
  • 11
0
votes
1 answer

QTableview row metadata

In a QTableView I'm trying to add some metadata for each row. An obvious solution would be to use the Qt::UserRole on the last column. Something like this. QStandardItemModel* model = new QStandardItemModel(); QStandardItem* item = new…
Vincent TR
  • 41
  • 5
0
votes
1 answer

IsUserInRole() vs Session[] in .Net Web Application

I am developing an application that will support several departments in our organization, and want to define what data is accessible by AD Groups a user is in. My question is, is it more cost effective resource wise (bandwidth, time slices, etc) to…
Keith Clark
  • 609
  • 1
  • 7
  • 19
0
votes
1 answer

Select User Accounts Not Logged In Database for 180 Days to Revoke Roles

How do I write a SELECT statement that "show all user accounts" that have not logged into the database for more than 180 days? My goal is to revoke the users accounts roles that have not logged into the database for more the 180 days. In other…
caa35
  • 71
  • 2
  • 10
0
votes
1 answer

should asserts or checks be completed before an action takes place to change the database?

Should checks on reads / writes to records in a database by users be performed before reading / writing the actual data? Or could one just apply it all in the same query? ie. assertUserCanViewClassRoom($classroomId, $userId,…
mcv
  • 1,380
  • 3
  • 16
  • 41
0
votes
1 answer

Instance and roles of ASP.net MVC 2 + SS 2008 Developer

Gonna need some advice for my work. In my computer I have installed VS2010 and SQL Server 2008 Developer with a customized instance name named MYCOMPUTER. If I need to transfer the project work, that is created with ASP.NET MVC 2 and of course I…
HelloWorld1
  • 13,688
  • 28
  • 82
  • 145
0
votes
1 answer

How to give new users two user role options upon WordPress user registration

I have a website that has customers and vendors. What is the proper way to let the new registered user choose which role they want? Do they want to be as a customers and buy things or do they want to start selling. I’m dreaming of a registration…