Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23871

show grants for {role} includes grants for roles it is a member of

    XMLWordPrintable

    Details

      Description

      show grants

       
      MariaDB [(none)]> CREATE ROLE role_1;
      Query OK, 0 rows affected (0.01 sec)
       
      MariaDB [(none)]> CREATE ROLE role_2 WITH ADMIN role_1;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [(none)]> show grants for role_1;
      +--------------------------------------------+
      | Grants for role_1                          |
      +--------------------------------------------+
      | GRANT role_2 TO 'role_1' WITH ADMIN OPTION |
      | GRANT USAGE ON *.* TO 'role_1'             |
      | GRANT USAGE ON *.* TO 'role_2'             |
      +--------------------------------------------+
       
      MariaDB [(none)]> show grants for role_2;
      +--------------------------------+
      | Grants for role_2              |
      +--------------------------------+
      | GRANT USAGE ON *.* TO 'role_2' |
      +--------------------------------+
      

      show grants for role_1 shouldn't include role_2 grants.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration