github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/tenant/privilege/role4_special_roles.sql (about)

     1  -- cases for moadmin
     2  drop role if exists rolex;
     3  create role rolex;
     4  drop user if exists userx;
     5  create user userx identified by '111';
     6  grant moadmin to root,dump;
     7  grant moadmin to userx;
     8  grant moadmin to rolex;
     9  grant rolex to moadmin;
    10  grant public to root,dump;
    11  grant public to userx;
    12  grant public to rolex;
    13  grant rolex to public;
    14  
    15  revoke moadmin from root;
    16  revoke moadmin from dump;
    17  revoke moadmin from userx;
    18  revoke moadmin from rolex;
    19  revoke rolex from moadmin;
    20  revoke public from root;
    21  revoke public from dump;
    22  revoke public from userx;
    23  revoke public from rolex;
    24  revoke rolex from public;
    25  
    26  grant show databases,create database on account * to moadmin;
    27  revoke show databases,create database on account * from moadmin;
    28  revoke connect on account * from public;
    29  revoke show databases on account * from public;
    30  grant create account on account * to rolex;
    31  grant drop account on account * to rolex;
    32  grant alter account on account * to rolex;
    33  drop role rolex;
    34  drop user userx;