JUSTIGNOREME
V2EX  ›  数据库

系统权限数据库设计里面权限可不可以放到单独的一个类或文件中

  •  
  •   JUSTIGNOREME · Sep 8, 2021 · 1543 views
    This topic created in 1709 days ago, the information mentioned may be changed or developed.

    一般系统权限对应一个处理请求的方法,所以系统权限的数量相对固定,对于一个只有几十或者一两百个权限的系统,可不可以把权限表放到一个枚举类或者一个文件中来维护

    3 replies    2021-09-08 11:58:11 +08:00
    xuanbg
        1
    xuanbg  
       Sep 8, 2021
    RBAC 又不复杂。。。劝你不要这么搞。
    777777
        2
    777777  
       Sep 8, 2021
    casbin
    tianzhou
        3
    tianzhou  
    PRO
       Sep 8, 2021
    可以看一下 casbin https://casbin.org/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5494 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 67ms · UTC 07:50 · PVG 15:50 · LAX 00:50 · JFK 03:50
    ♥ Do have faith in what you're doing.