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

Displaying a particular web page when user roles don't match the tag in Web.config

We would like to display a particular web page when the role of people who are not administrators, sfaff and data entry administrators are logged in to our ASP.Net web site. We would like to display the web page called EntryNotAllowed.aspx This is…
Emad-ud-deen
  • 4,734
  • 21
  • 87
  • 152
0
votes
2 answers

Wordpress secure way to have Private/Public posts

I've asked a few questions trying to solve this simple problem, but nothing seems to work. Whats the recommended way to have private/public posts? I want to have a site that if an author/editor/administrator are logged in every private post and…
invamped
  • 317
  • 7
  • 18
0
votes
1 answer

Trying to access current user's role

I need to access my current users role in order to make sure they are an admin. If they are an admin I want to display the following link in my view. <% if current_user.role =='admin' %>
  • 0
    votes
    1 answer

    Ruby Allowing a user to create a post, which only allows other certain selected users to edit certain parts

    Im new to ruby but trying to create a project, after doing some research i found to use Devise, cancan and role models, however im not having much luck and would really appreciate some assistance or guidance n where i can go to do this! Basically i…
    0
    votes
    1 answer

    How to avoid DB exceptions when changing users role?

    I have such situation: I have Users table and I divide users by type: Admins, Managers, Customer. Managers can be created only with Organizer model( organizer has_many managers) and it is creating on nested form. I want to upgrade Customer to…
    Denys Medynskyi
    • 2,353
    • 8
    • 39
    • 70
    0
    votes
    1 answer

    Display data from database to specific users (using roles?)

    I want to display some data to specific users. I've already done something similar but the difference is that the role number was static. For example I added a column and gave '1' to specific users, so I wrote if($role == 1) { do something }. That…
    shieldcy
    • 592
    • 2
    • 11
    • 35
    0
    votes
    0 answers

    Screen level and field level rules implementation Spring MVC

    My web application is using Spring MVC. Each user has multiple roles. Each role has an access level.The access level defines whether user has access to particular screen or not. Also it defines that on a particular screen which fields it can…
    webdev
    • 598
    • 5
    • 16
    0
    votes
    1 answer

    How to give a Wordpress user (editor) permission to a special admin page?

    I want to give users with user role editor access to my plugin settings page. .../wp-admin/admin.php?page=myplugin_settingspage by default only admin can access this page. I implemented this code to protect the config page. if…
    Stephan Ahlf
    • 3,310
    • 5
    • 39
    • 68
    0
    votes
    0 answers

    Adding custom Role to Wordpress with custom permissions

    I'd like to add a new role to my Wordpress site. It needs more permissions than Author, but fewer than Admin. Searching the codex and Stack, I have come across a consistent method of adding this code to functions.php, but a repeated error resulted…
    user1729506
    • 975
    • 4
    • 15
    • 28
    0
    votes
    1 answer

    restrict wordpress user to only edit users with same meta key value

    I have a wordpress site set up, inside there is a master admin, then I have user Role Manager to change the Subscriber role to be able to add new users. I have then successfully restricted the subscriber to only making new users with a new role i…
    AndrewBramwell
    • 494
    • 1
    • 7
    • 26
    0
    votes
    1 answer

    How do you get the user role of the currently logged in user in Opencart?

    I wanted to get the user role id of the currently logged in user in Opencart for a required tweak on the listings of products. I could try to dig deep into opencart to see but hoping someone can save me time. Cheers
    Albert
    • 3
    • 2
    0
    votes
    3 answers

    How can I show or hide menu options in Master page depending user roles and permissions?

    I'm trying to control the menu options depending user roles and permission, after the user login. I saved the user in session and then I get the roles and permissions from data base, then I want to show the main page which is a Master with the menu…
    0
    votes
    1 answer

    User Roles in Codeigniter

    I wanna make a User Roles based on payments. I have seen exact system in the website www.indiancupid.com`. There when you register, you become a standard member, you can see the profiles of other users but you can't contact them until you pay, and…
    Cute Tom
    • 111
    • 3
    • 9
    0
    votes
    1 answer

    Revoke User Role from inherited Group

    I'm using FOSUserBundle and set up a User / Group environment. I can give Roles to Groups and Users. Basically I give the Roles to the Group. Now, I want to revoke some Users in a Group a Role that is inherited from the Group. Every time I…
    develth
    • 771
    • 8
    • 32
    0
    votes
    1 answer

    Where to define user roles in a spring protlet application?

    In my Spring portlet controller, I have a method annotated like this: @PreAuthorize("hasRole('ROLE_BankUser') Now when a user logs in to the portal and tries to access the portlet, where from will this method know if the user has a role of…
    Victor
    • 16,609
    • 71
    • 229
    • 409