zoukankan      html  css  js  c++  java
  • PostgreSQL的Access control lists

    ACL表现行式:

    grantee=flags/grantor
    

    其中:

    ·grantee:被授予权限的角色

    ·flags:字符串方式表示的权限

    ·grantor:授权的用户

     

     

    FlagDescriptionStatementsApplies to
    a append, insert new data INSERT tables, columns
    r read, get data SELECT tables, columns, and sequences
    w write, update data UPDATE tables
    d delete data DELETE tables
    D delete all data TRUNCATE tables
    C create a new object CREATE databases, schemas, and table spaces
    c connect to a database   database
    t trigger, react to data changes CREATE TRIGGER tables
    T crate temporary objects CREATE TEMP tables
    x cross reference between data FOREIGN KEY tables
    X execute runnable code CALL, SELECT functions, routines, and procedures
    U use of various objects   sequences, schemas, foreign objects, types, and languages

     例如,查看表abc_project上的ACLs

    #dp abc_project
                                         Access privileges
     Schema |    Name     | Type  |      Access privileges      | Column privileges | Policies 
    --------+-------------+-------+-----------------------------+-------------------+----------
     public | abc_project | table | abc_adada=arwdDxt/abc_adada+|                   | 
            |             |       | hahauuu=rw/abc_adada       +|                   | 
            |             |       | xixixiao=r/abc_adada       +|                   |  
    (1 row)
    

      

    默认的ACLs

    新创建的对象,如果没有做任何授权,acl内容为空,就需要使用默认的ACLs了:

    #create table abce(id int);
    CREATE TABLE
    postgres@[local]:5631=#dp abce;
                                Access privileges
     Schema | Name | Type  | Access privileges | Column privileges | Policies 
    --------+------+-------+-------------------+-------------------+----------
     public | abce | table |                   |                   | 
    (1 row)
    

      

  • 相关阅读:
    【带着canvas去流浪(14)】Three.js中凹浮雕模型的生成方式
    Stanford公开课《编译原理》学习笔记(1~4课)
    Vue源码中compiler部分逻辑梳理(内有彩蛋)
    Vue+ElementUI项目使用webpack输出MPA
    Vue-Router中History模式
    Vue中拆分视图层代码的5点建议
    如何正确使用Java泛型
    ZooKeeper的三种典型应用场景
    Tomcat多实例部署
    Tomcat常用的过滤器
  • 原文地址:https://www.cnblogs.com/abclife/p/14311556.html
Copyright © 2011-2022 走看看