diff options
author | Stephen Frost <sfrost@snowman.net> | 2016-05-06 14:06:50 -0400 |
---|---|---|
committer | Stephen Frost <sfrost@snowman.net> | 2016-05-06 14:06:50 -0400 |
commit | a89505fd21da337b81172871d8f65d9a4fa22a8b (patch) | |
tree | da01d9648257bda268a0a344858b04c6735910eb /src/backend/commands/user.c | |
parent | 6bd356c33a3cf3a49313dc8638ea4bb066c4cf37 (diff) | |
download | postgresql-a89505fd21da337b81172871d8f65d9a4fa22a8b.tar.gz postgresql-a89505fd21da337b81172871d8f65d9a4fa22a8b.zip |
Remove various special checks around default roles
Default roles really should be like regular roles, for the most part.
This removes a number of checks that were trying to make default roles
extra special by not allowing them to be used as regular roles.
We still prevent users from creating roles in the "pg_" namespace or
from altering roles which exist in that namespace via ALTER ROLE, as
we can't preserve such changes, but otherwise the roles are very much
like regular roles.
Based on discussion with Robert and Tom.
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index cc3d5645343..f0ac636b9b7 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -1262,18 +1262,10 @@ GrantRole(GrantRoleStmt *stmt) ListCell *item; if (stmt->grantor) - { - check_rolespec_name(stmt->grantor, - "Cannot specify reserved role as grantor."); grantor = get_rolespec_oid(stmt->grantor, false); - } else grantor = GetUserId(); - foreach(item, stmt->grantee_roles) - check_rolespec_name(lfirst(item), - "Cannot GRANT roles to a reserved role."); - grantee_ids = roleSpecsToIds(stmt->grantee_roles); /* AccessShareLock is enough since we aren't modifying pg_authid */ @@ -1364,9 +1356,6 @@ ReassignOwnedObjects(ReassignOwnedStmt *stmt) errmsg("permission denied to reassign objects"))); } - check_rolespec_name(stmt->newrole, - "Cannot specify reserved role as owner."); - /* Must have privileges on the receiving side too */ newrole = get_rolespec_oid(stmt->newrole, false); |