domain

package
v0.0.0-...-57ed434 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const RoleInitSql = consts.TemplateDirPrefix + "role_init.template"

Variables

View Source
var DefaultRoleName = []string{
	"组织超级管理员",
	"组织管理员",
	"组织成员",
	"负责人",
	"项目成员",
}

特殊角色名称

Functions

func AddRoleUserRelation

func AddRoleUserRelation(orgId, userId, roleId int64) errs.SystemErrorInfo

添加角色和用户关联

func ChangeDefaultRole

func ChangeDefaultRole() errs.SystemErrorInfo

func ClearDepartmentRoleList

func ClearDepartmentRoleList(orgId, departmentId, projectId int64) errs.SystemErrorInfo

删除用户角色列表缓存

func ClearUserRoleList

func ClearUserRoleList(orgId, userId, projectId int64) errs.SystemErrorInfo

删除用户角色列表缓存

func CopyPermission

func CopyPermission(permissionList *[]bo.RolePermissionOperationBo, roleId int64, orgId int64) errs.SystemErrorInfo

func CreateRole

func CreateRole(orgId, userId int64, input vo.CreateRoleReq, groupId int64) (int64, errs.SystemErrorInfo)

func DeleteRoles

func DeleteRoles(orgId int64, roleIds []int64, operatorId int64) errs.SystemErrorInfo

func GetGroupRoleList

func GetGroupRoleList(orgId int64) (*[]bo.RoleGroupBo, errs.SystemErrorInfo)

组织角色组缓存

func GetOrgRoleUser

func GetOrgRoleUser(orgId int64, projectId int64, langCodes []string) (*[]bo.RoleUser, errs.SystemErrorInfo)

获取组织用户特殊角色

func GetOrgRoleUserBatch

func GetOrgRoleUserBatch(orgIds []int64, projectId int64, langCodes []string) (*[]bo.RoleUserWithOrgId, errs.SystemErrorInfo)

func GetPermissionById

func GetPermissionById(permissionId int64) (bo2.PermissionBo, errs.SystemErrorInfo)

TODO 切换lesscode-permission

func GetPermissionByType

func GetPermissionByType(permissionType int) ([]bo2.PermissionBo, errs.SystemErrorInfo)

TODO 切换lesscode-permission

func GetPermissionList

func GetPermissionList() (*[]bo2.PermissionBo, errs.SystemErrorInfo)

TODO 切换lesscode-permission

func GetPermissionOperationList

func GetPermissionOperationList() (*[]bo2.PermissionOperationBo, errs.SystemErrorInfo)

func GetPermissionOperationListByPermissionId

func GetPermissionOperationListByPermissionId(permissionId int64) ([]bo2.PermissionOperationBo, errs.SystemErrorInfo)

func GetProjectPermission

func GetProjectPermission(orgId, projectId int64) ([]bo2.PermissionBo, errs.SystemErrorInfo)

TODO 切换lesscode-permission 获取项目权限项(只取部分)

func GetRole

func GetRole(orgId, projectId, roleId int64) (*bo.RoleBo, errs.SystemErrorInfo)

func GetRoleByName

func GetRoleByName(orgId, projectId int64, roleName string) (*bo.RoleBo, errs.SystemErrorInfo)

func GetRoleList

func GetRoleList(orgId int64, projectId int64, roleIds []int64, includeAll bool) ([]bo.RoleBo, errs.SystemErrorInfo)

projectId:传0表示忽略此条件 org_id = 0:传空忽略此条件

func GetSysDefaultRoles

func GetSysDefaultRoles(orgId int64) ([]bo.RoleBo, errs.SystemErrorInfo)

func JudgeRoleName

func JudgeRoleName(name string) errs.SystemErrorInfo

func RemoveRoleDepartmentRelation

func RemoveRoleDepartmentRelation(orgId int64, deptIds []int64, operatorId int64) errs.SystemErrorInfo

移除角色和部门关联

func RemoveRoleUserRelation

func RemoveRoleUserRelation(orgId int64, userIds []int64, operatorId int64) errs.SystemErrorInfo

移除角色和用户关联

func RoleInit

func RoleInit(orgId int64, tx sqlbuilder.Tx) (*bo.RoleInitResp, errs.SystemErrorInfo)

func UpdateRole

func UpdateRole(orgId int64, projectId int64, roleId int64, updateBo bo.UpdateRoleBo, operatorId int64) errs.SystemErrorInfo

没有projectId就传0

func UpdateRolePermissionOperation

func UpdateRolePermissionOperation(orgId int64, userId int64, roleId int64, permissionOperation map[int64][]string, roleLangCode string, projectId int64) errs.SystemErrorInfo

func UpdateUserOrgRole

func UpdateUserOrgRole(role *bo.RoleBo, orgId int64, currentUserId int64, userIds []int64, projectId *int64) (int64, errs.SystemErrorInfo)

Types

This section is empty.

Jump to

Keyboard shortcuts

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