All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jd.blockchain.ledger.RolesPolicy Maven / Gradle / Ivy

There is a newer version: 1.6.5.RELEASE
Show newest version
package com.jd.blockchain.ledger;

import com.jd.binaryproto.EnumContract;
import com.jd.binaryproto.EnumField;
import com.jd.binaryproto.PrimitiveType;
import com.jd.blockchain.consts.DataCodes;

/**
 * 多角色策略;
* * 表示如何处理一个对象被赋予多个角色时的综合权限; * * @author huanghaiquan * */ @EnumContract(code = DataCodes.ENUM_MULTI_ROLES_POLICY, name = "USER-ROLE-POLICY") public enum RolesPolicy { /** * 合并权限;
* * 综合权限是所有角色权限的并集,即任何一个角色的权限都被继承; */ UNION((byte) 0), /** * 交叉权限;
* * 综合权限是所有角色权限的交集,即只有全部角色共同拥有的权限才会被继承; */ INTERSECT((byte) 1); @EnumField(type = PrimitiveType.INT8) public final byte CODE; private RolesPolicy(byte code) { this.CODE = code; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy