+ 添加autils.NewStoreBossRole

This commit is contained in:
gazebo
2019-09-09 12:03:07 +08:00
parent 0abd1b0642
commit f4e97af0e1
5 changed files with 10 additions and 9 deletions

View File

@@ -37,6 +37,10 @@ func NewRole(name string, storeID int) (r *authz.RoleInfo) {
return r
}
func NewStoreBossRole(storeID int) (r *authz.RoleInfo) {
return NewRole(authz.StoreRoleBoss, storeID)
}
func NewRoleByModel(conf *model.NewConfig) (r *authz.RoleInfo) {
if conf.Type != model.ConfigTypeRole {
r = NewRole(conf.Key, 0)