Database schema for ACL

前端 未结 3 1135
梦如初夏
梦如初夏 2020-12-04 09:12

I want to create a schema for a ACL; however, I\'m torn between a couple of ways of implementing it.

I am pretty sure I don\'t want to deal with cascading permission

3条回答
  •  悲&欢浪女
    2020-12-04 09:43

    You can use a SET to assign the roles.

    CREATE TABLE permission (
      id integer primary key autoincrement
      ,name varchar
      ,perm SET('create', 'edit', 'delete', 'view')
      ,resource_id integer );
    

提交回复
热议问题