Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

user.c

Blame
    • Tom Lane's avatar
      49a08ca1
      Adjust the permissions required for COMMENT ON ROLE. · 49a08ca1
      Tom Lane authored
      Formerly, any member of a role could change the role's comment, as of
      course could superusers; but holders of CREATEROLE privilege could not,
      unless they were also members.  This led to the odd situation that a
      CREATEROLE holder could create a role but then could not comment on it.
      It also seems a bit dubious to let an unprivileged user change his own
      comment, let alone those of group roles he belongs to.  So, change the
      rule to be "you must be superuser to comment on a superuser role, or
      hold CREATEROLE to comment on non-superuser roles".  This is the same
      as the privilege check for creating/dropping roles, and thus fits much
      better with the rule for other object types, namely that only the owner
      of an object can comment on it.
      
      In passing, clean up the documentation for COMMENT a little bit.
      
      Per complaint from Owen Jacobson and subsequent discussion.
      49a08ca1
      History
      Adjust the permissions required for COMMENT ON ROLE.
      Tom Lane authored
      Formerly, any member of a role could change the role's comment, as of
      course could superusers; but holders of CREATEROLE privilege could not,
      unless they were also members.  This led to the odd situation that a
      CREATEROLE holder could create a role but then could not comment on it.
      It also seems a bit dubious to let an unprivileged user change his own
      comment, let alone those of group roles he belongs to.  So, change the
      rule to be "you must be superuser to comment on a superuser role, or
      hold CREATEROLE to comment on non-superuser roles".  This is the same
      as the privilege check for creating/dropping roles, and thus fits much
      better with the rule for other object types, namely that only the owner
      of an object can comment on it.
      
      In passing, clean up the documentation for COMMENT a little bit.
      
      Per complaint from Owen Jacobson and subsequent discussion.