service

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: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssemblyOptAuthData

func AssemblyOptAuthData(optAuthArr []string, groupOpList map[string][]string) map[string][]string

func AuthOrgRole

func AuthOrgRole(orgId, userId int64, path string, operation string) errs.SystemErrorInfo

func Authenticate

func Authenticate(orgId int64, userId int64, projectAuthInfo *bo.ProjectAuthBo, issueAuthInfo *bo.IssueAuthBo, path string, operation string, authFields []string) errs.SystemErrorInfo

func ChangeDefaultRole

func ChangeDefaultRole() errs.SystemErrorInfo

func CheckIssueAuth

func CheckIssueAuth(orgId, userId int64, issueAuthBo *bo.IssueAuthBo) (bool, errs.SystemErrorInfo)

CheckIssueAuth 检查对任务的操作是否有权限,任务的负责人、创建人、关注人有权限编辑任务。

func ClearRolePermissionOperationList

func ClearRolePermissionOperationList(orgId, roleId, projectId int64) errs.SystemErrorInfo

func ClearUserRoleList

func ClearUserRoleList(orgId int64, userIds []int64, projectId int64) errs.SystemErrorInfo

func CreateRole

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

创建角色

func DelRole

func DelRole(orgId int64, userId int64, input vo.DelRoleReq) errs.SystemErrorInfo

func GetCateOfOperation

func GetCateOfOperation(op string) string

GetCateOfOperation 通过转化好的操作码,匹配它所在的分类组 如:`Permission.Pro.View-ManagePrivate` 拿到 Permission.Pro.View,去匹配分类 如:`Permission.Pro.View.ManagePrivate` 拿到 Permission.Pro.View,去匹配分类

func GetCompensatoryRolePermissionPaths

func GetCompensatoryRolePermissionPaths(orgId int64) ([]string, errs.SystemErrorInfo)

func GetDepartmentRoleList

func GetDepartmentRoleList(orgId, departmentId int64, projectId int64)

去除了 rolesvc 后,导致引入的东西不存在,方法先注释

func GetOpSuffixOfOperation

func GetOpSuffixOfOperation(op string) string

GetOpSuffixOfOperation 通过转化好的操作码,匹配它的权限的 suffix 值 如:`xxx.Config.Modify` 则得到 Modify

func GetOrgAdminUser

func GetOrgAdminUser(orgId int64) ([]int64, errs.SystemErrorInfo)

func GetOrgAdminUserBatch

func GetOrgAdminUserBatch(orgIds []int64) (result map[int64][]int64, busiErr errs.SystemErrorInfo)

批量获取多个组织下的超管+管理员用户id

func GetOrgRoleList

func GetOrgRoleList(orgId int64) ([]*vo.Role, errs.SystemErrorInfo)

获取组织角色列表

func GetOrgRoleUser

func GetOrgRoleUser(orgId int64, projectId int64) ([]rolevo.RoleUser, errs.SystemErrorInfo)

func GetPermissionCodeMap

func GetPermissionCodeMap(langCode string) string

权限 langCode 到 code 的映射,如:Permission.Org.ProjectObjectType->ProjectObjectType

func GetPersonalPermissionInfoForFuse

func GetPersonalPermissionInfoForFuse(orgId, userId int64, projectId, issueId *int64, sourceChannel string) (map[string]interface{}, errs.SystemErrorInfo)

融合极星-获取个人的项目权限

func GetProjectRoleList

func GetProjectRoleList(orgId int64, projectId int64) ([]*vo.Role, errs.SystemErrorInfo)

获取项目所有角色

func GetRoleByLangCode

func GetRoleByLangCode(orgId int64, langCode string) (*bo.RoleBo, errs.SystemErrorInfo)

查询系统定义角色

func GetRoleListByGroup

func GetRoleListByGroup(orgId int64, langCode string, projectId int64) ([]bo.RoleBo, errs.SystemErrorInfo)

func GetRoleOperationByCode

func GetRoleOperationByCode(code string) (*bo.OperationBo, errs.SystemErrorInfo)

func GetRoleOperationList

func GetRoleOperationList() (*[]bo.OperationBo, errs.SystemErrorInfo)

func GetRolePermissionOperationList

func GetRolePermissionOperationList(orgId, roleId int64, projectId int64) (*[]bo.RolePermissionOperationBo, errs.SystemErrorInfo)

func GetRolePermissionOperationListByPath

func GetRolePermissionOperationListByPath(orgId int64, roleIds []int64, path string, projectId int64) (*[]bo.RolePermissionOperationBo, errs.SystemErrorInfo)

func GetRoleUserIds

func GetRoleUserIds(orgId, roleId int64) ([]int64, errs.SystemErrorInfo)

func GetUserAdminFlag

func GetUserAdminFlag(orgId, userId int64) (*bo.UserAdminFlagBo, errs.SystemErrorInfo)

func GetUserRoleList

func GetUserRoleList(orgId, userId int64, projectId int64) (*[]bo.RoleUserBo, errs.SystemErrorInfo)

func GetUserRoleListByProjectId

func GetUserRoleListByProjectId(orgId, userId, projectId int64) ([]int64, errs.SystemErrorInfo)

func LessCodeOp2PolarisOpArr

func LessCodeOp2PolarisOpArr(op string) map[string][]string

无码的**管理组**-权限项限映射为极星的权限项

func PermissionOperationList

func PermissionOperationList(orgId, roleId, userId int64, projectId *int64) ([]*vo.PermissionOperationListResp, errs.SystemErrorInfo)

func RemoveRoleDepartmentRelation

func RemoveRoleDepartmentRelation(req rolevo.RemoveRoleDepartmentRelationReqVo) errs.SystemErrorInfo

移除角色和部门关联

func RemoveRoleUserRelation

func RemoveRoleUserRelation(req rolevo.RemoveRoleUserRelationReqVo) errs.SystemErrorInfo

移除角色和用户关联

func RoleInit

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

func RoleUserRelation

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

func SetCompensatoryRolePermissionPaths

func SetCompensatoryRolePermissionPaths(orgId int64, paths []string) errs.SystemErrorInfo

func TransferOperationArr

func TransferOperationArr(optAuthArr []string) []string

将形如:`["Permission.Pro.Tag-Create,Modify,Delete"]` 的权限数组转换为 operation(格式是:`Permission.Pro.Tag.Create`) 一致的格式。

func UpdateOrgAdmin

func UpdateOrgAdmin(userId int64, orgId int64, oldOwnerId, newOwnerId int64) (*vo.Void, errs.SystemErrorInfo)

func UpdateRole

func UpdateRole(orgId int64, userId int64, input vo.UpdateRoleReq) (int64, errs.SystemErrorInfo)

func UpdateRolePermissionOperation

func UpdateRolePermissionOperation(orgId int64, userId int64, input vo.UpdateRolePermissionOperationReq) (*vo.Void, 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