Documentation ¶
Index ¶
- type AuthorityService
- func (u *AuthorityService) GetOrganizationAuthorities(organizationId string) (int64, []*OperationModel.Operation)
- func (a *AuthorityService) GetOrganizationAvailableAuthorities(organizationId string) []*OperationModel.Operation
- func (u *AuthorityService) GetRoleAuthorities(roleId string) (int64, []*OperationModel.Operation)
- func (a *AuthorityService) GetRoleAvailableAuthorities(roleId string) []*OperationModel.Operation
- func (u *AuthorityService) GetSystemAuthorities() (int64, []*OperationModel.Operation)
- func (a *AuthorityService) GetUserAuthorities(userId string) []*OperationModel.Operation
- func (a *AuthorityService) GetUserAvailableAuthorities(userId string) []*OperationModel.Operation
- func (u *AuthorityService) GetUserMenuTree(userId string) []*OperationModel.Menu
- func (u *AuthorityService) GetUserMenus(userId string) []*OperationModel.Menu
- func (u *AuthorityService) SetOrganizationAuthorities(organizationId string, authorities []*OperationModel.Operation)
- func (u *AuthorityService) SetRoleAuthorities(roleId string, authorities []*OperationModel.Operation)
- func (u *AuthorityService) SetUserAuthorities(userId string, authorities []*OperationModel.Operation)
- type CasbinService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorityService ¶
type AuthorityService struct { service.BaseService AuthorityRepository *repository.AuthorityRepository `inject:"authorityRepository"` MenuService *Operation.MenuService `inject:"menuService"` RoleUserService *System.RoleUserService `inject:"roleUserService"` }
func (*AuthorityService) GetOrganizationAuthorities ¶
func (u *AuthorityService) GetOrganizationAuthorities(organizationId string) (int64, []*OperationModel.Operation)
func (*AuthorityService) GetOrganizationAvailableAuthorities ¶
func (a *AuthorityService) GetOrganizationAvailableAuthorities(organizationId string) []*OperationModel.Operation
根据用户ID获取所有权限的来源
func (*AuthorityService) GetRoleAuthorities ¶
func (u *AuthorityService) GetRoleAuthorities(roleId string) (int64, []*OperationModel.Operation)
func (*AuthorityService) GetRoleAvailableAuthorities ¶
func (a *AuthorityService) GetRoleAvailableAuthorities(roleId string) []*OperationModel.Operation
根据用户ID获取所有权限的来源
func (*AuthorityService) GetSystemAuthorities ¶
func (u *AuthorityService) GetSystemAuthorities() (int64, []*OperationModel.Operation)
func (*AuthorityService) GetUserAuthorities ¶
func (a *AuthorityService) GetUserAuthorities(userId string) []*OperationModel.Operation
根据用户ID获取所有权限的来源
func (*AuthorityService) GetUserAvailableAuthorities ¶
func (a *AuthorityService) GetUserAvailableAuthorities(userId string) []*OperationModel.Operation
根据用户ID获取所有权限的来源
func (*AuthorityService) GetUserMenuTree ¶
func (u *AuthorityService) GetUserMenuTree(userId string) []*OperationModel.Menu
func (*AuthorityService) GetUserMenus ¶
func (u *AuthorityService) GetUserMenus(userId string) []*OperationModel.Menu
func (*AuthorityService) SetOrganizationAuthorities ¶
func (u *AuthorityService) SetOrganizationAuthorities(organizationId string, authorities []*OperationModel.Operation)
func (*AuthorityService) SetRoleAuthorities ¶
func (u *AuthorityService) SetRoleAuthorities(roleId string, authorities []*OperationModel.Operation)
func (*AuthorityService) SetUserAuthorities ¶
func (u *AuthorityService) SetUserAuthorities(userId string, authorities []*OperationModel.Operation)
type CasbinService ¶
type CasbinService struct { Enforcer *casbin.SyncedEnforcer `inject:"enforcer"` UserService *service.UserService `inject:"userService"` RoleService *service.RoleService `inject:"roleService"` }
CasbinService负责更新Casbin Enforce数据至
func (*CasbinService) LoadAllPolicy ¶
func (s *CasbinService) LoadAllPolicy() error
LoadAllPolicy 加载所有的角色策略
func (*CasbinService) LoadPolicy ¶
func (s *CasbinService) LoadPolicy(id string) error
LoadPolicy 加载角色权限策略
Click to show internal directories.
Click to hide internal directories.