Questions tagged [roles]

In various access control systems, roles define a group of users and organize permissions into a more manageable structure.

In various systems, roles define a group of users and organize permissions into a more manageable structure. In systems which feature roles, a user may belong to many roles, and typically roles can be nested hierarchically.

Roles are a common feature in operating systems as well as database management systems.

Further Reading

3030 questions
1365
votes
8 answers

What is the purpose of the "role" attribute in HTML?

I keep seeing role attributes in some people's work. I use it too, but I'm not sure about its effect. For example: Or:
jeroen
  • 13,760
  • 3
  • 16
  • 10
325
votes
13 answers

Allow multiple roles to access controller action

Right now I decorate a method like this to allow "members" to access my controller action [Authorize(Roles="members")] How do I allow more than one role? For example the following does not work but it shows what I am trying to do (allow "members"…
codette
  • 12,343
  • 9
  • 37
  • 38
217
votes
4 answers

PostgreSQL: role is not permitted to log in

I have trouble connecting to my own postgres db on a local server. I googled some similar problems and came up with this manual https://help.ubuntu.com/stable/serverguide/postgresql.html so: pg_hba.conf says: # TYPE DATABASE USER …
kurtgn
  • 8,140
  • 13
  • 55
  • 91
208
votes
12 answers

Create PostgreSQL ROLE (user) if it doesn't exist

How do I write an SQL script to create a ROLE in PostgreSQL 9.1, but without raising an error if it already exists? The current script simply has: CREATE ROLE my_user LOGIN PASSWORD 'my_password'; This fails if the user already exists. I'd like…
EMP
  • 59,148
  • 53
  • 164
  • 220
173
votes
12 answers

The provided execution role does not have permissions to call DescribeNetworkInterfaces on EC2

When I input any code in this function (e.g. console.log();) and click "Save", an error occurs: The provided execution role does not have permissions to call DescribeNetworkInterfaces on EC2 exports.handler = (event, context, callback) => { …
fish
  • 2,173
  • 2
  • 13
  • 18
165
votes
10 answers

Group vs role (Any real difference?)

Can anyone tell me, what's the real difference between group and role? I've been trying to figure this out for some time now and the more information I read, the more I get the sense that this is brought up just to confuse people and there is no…
Ondrej
  • 2,287
  • 6
  • 18
  • 17
135
votes
9 answers

"ERROR: must be member of role" When creating schema in PostgreSQL

I'm logged in with a superuser account and this is the process I'm doing: 1-> CREATE ROLE test WITH IN ROLE testroles PASSWORD 'testpasswd' 2-> CREATE SCHEMA AUTHORIZATION test The role is correctly created but I'm getting this error when trying to…
Ultranuke
  • 1,735
  • 2
  • 15
  • 21
130
votes
5 answers

Best Practices for Roles vs. Claims in ASP.NET Identity

I am completely new to the use of claims in ASP.NETIdentity and want to get an idea of best practices in the use of Roles and/or Claims. After all this reading, I still have questions like... Q: Do we no longer use Roles? Q: If so, why are Roles…
Prisoner ZERO
  • 13,848
  • 21
  • 92
  • 137
121
votes
6 answers

Cannot drop PostgreSQL role. Error: `cannot be dropped because some objects depend on it`

I was trying to delete PostgreSQL user: DROP USER ryan; I received this error: Error in query: ERROR: role "ryan" cannot be dropped because some objects depend on it DETAIL: privileges for database mydatabase I looked for a solution from these…
notalentgeek
  • 4,939
  • 11
  • 34
  • 53
116
votes
2 answers

Grant all on a specific schema in the db to a group role in PostgreSQL

Using PostgreSQL 9.0, I have a group role called "staff" and would like to grant all (or certain) privileges to this role on tables in a particular schema. None of the following work GRANT ALL ON SCHEMA foo TO staff; GRANT ALL ON DATABASE mydb TO…
punkish
  • 13,598
  • 26
  • 66
  • 101
99
votes
8 answers

How to make many files public in Google Cloud Storage?

I have 1000 files in Google Cloud Storage to make public, or in general a directory hierarchy. In the Web UI, I can only seem to make one at a time public. Is there some way to do this.
90
votes
8 answers

MongoDB "root" user

Is there a super UNIX like "root" user for MongoDB? I've been looking at http://docs.mongodb.org/manual/reference/user-privileges/ and have tried many combinations, but they all seem to lack in an area or another. Surely there is a role that is…
No_name
  • 2,732
  • 3
  • 32
  • 48
88
votes
9 answers

Ansible - Print message - debug: msg="line1 \n {{ var2 }} \n line3 with var3 = {{ var3 }}"

In Ansible (1.9.4) or 2.0.0 I ran the following action: - debug: msg="line1 \n {{ var2 }} \n line3 with var3 = {{ var3 }}" $ cat roles/setup_jenkins_slave/tasks/main.yml - debug: msg="Installing swarm slave = {{ slave_name }} at {{ slaves_dir }}/{{…
AKS
  • 16,482
  • 43
  • 166
  • 258
86
votes
4 answers

Is setting Roles in JWT a best practice?

I am considering to use JWT. In the jwt.io example I am seeing the following information in the payload data: "admin": true Admin can be considered as a Role, hence my question. Is setting the role in the token payload a habitual/good practice?…
ayorosmage
  • 1,607
  • 1
  • 15
  • 21
86
votes
7 answers

asp.net identity get all roles of logged in user

I created a role based menu for which I followed this tutorial. Some where down that page you'll see this line of code: String[] roles = Roles.GetRolesForUser(); It returns all roles of the currently logged in user. I was wondering how to…
Quoter
  • 4,236
  • 13
  • 47
  • 69
1
2 3
99 100