service

package
v0.0.61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 加载角色权限策略

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL