Documentation ¶
Index ¶
- func AssemblyOptAuthData(optAuthArr []string, groupOpList map[string][]string) map[string][]string
- func AuthOrgRole(orgId, userId int64, path string, operation string) errs.SystemErrorInfo
- func Authenticate(orgId int64, userId int64, projectAuthInfo *bo.ProjectAuthBo, ...) errs.SystemErrorInfo
- func ChangeDefaultRole() errs.SystemErrorInfo
- func CheckIssueAuth(orgId, userId int64, issueAuthBo *bo.IssueAuthBo) (bool, errs.SystemErrorInfo)
- func ClearRolePermissionOperationList(orgId, roleId, projectId int64) errs.SystemErrorInfo
- func ClearUserRoleList(orgId int64, userIds []int64, projectId int64) errs.SystemErrorInfo
- func CreateRole(orgId, userId int64, input vo.CreateRoleReq) (*vo.Void, errs.SystemErrorInfo)
- func DelRole(orgId int64, userId int64, input vo.DelRoleReq) errs.SystemErrorInfo
- func GetCateOfOperation(op string) string
- func GetCompensatoryRolePermissionPaths(orgId int64) ([]string, errs.SystemErrorInfo)
- func GetDepartmentRoleList(orgId, departmentId int64, projectId int64)
- func GetOpSuffixOfOperation(op string) string
- func GetOrgAdminUser(orgId int64) ([]int64, errs.SystemErrorInfo)
- func GetOrgAdminUserBatch(orgIds []int64) (result map[int64][]int64, busiErr errs.SystemErrorInfo)
- func GetOrgRoleList(orgId int64) ([]*vo.Role, errs.SystemErrorInfo)
- func GetOrgRoleUser(orgId int64, projectId int64) ([]rolevo.RoleUser, errs.SystemErrorInfo)
- func GetPermissionCodeMap(langCode string) string
- func GetPersonalPermissionInfoForFuse(orgId, userId int64, projectId, issueId *int64, sourceChannel string) (map[string]interface{}, errs.SystemErrorInfo)
- func GetProjectRoleList(orgId int64, projectId int64) ([]*vo.Role, errs.SystemErrorInfo)
- func GetRoleByLangCode(orgId int64, langCode string) (*bo.RoleBo, errs.SystemErrorInfo)
- func GetRoleListByGroup(orgId int64, langCode string, projectId int64) ([]bo.RoleBo, errs.SystemErrorInfo)
- func GetRoleOperationByCode(code string) (*bo.OperationBo, errs.SystemErrorInfo)
- func GetRoleOperationList() (*[]bo.OperationBo, errs.SystemErrorInfo)
- func GetRolePermissionOperationList(orgId, roleId int64, projectId int64) (*[]bo.RolePermissionOperationBo, errs.SystemErrorInfo)
- func GetRolePermissionOperationListByPath(orgId int64, roleIds []int64, path string, projectId int64) (*[]bo.RolePermissionOperationBo, errs.SystemErrorInfo)
- func GetRoleUserIds(orgId, roleId int64) ([]int64, errs.SystemErrorInfo)
- func GetUserAdminFlag(orgId, userId int64) (*bo.UserAdminFlagBo, errs.SystemErrorInfo)
- func GetUserRoleList(orgId, userId int64, projectId int64) (*[]bo.RoleUserBo, errs.SystemErrorInfo)
- func GetUserRoleListByProjectId(orgId, userId, projectId int64) ([]int64, errs.SystemErrorInfo)
- func LessCodeOp2PolarisOpArr(op string) map[string][]string
- func PermissionOperationList(orgId, roleId, userId int64, projectId *int64) ([]*vo.PermissionOperationListResp, errs.SystemErrorInfo)
- func RemoveRoleDepartmentRelation(req rolevo.RemoveRoleDepartmentRelationReqVo) errs.SystemErrorInfo
- func RemoveRoleUserRelation(req rolevo.RemoveRoleUserRelationReqVo) errs.SystemErrorInfo
- func RoleInit(orgId int64) (*bo.RoleInitResp, errs.SystemErrorInfo)
- func RoleUserRelation(orgId, userId, roleId int64) errs.SystemErrorInfo
- func SetCompensatoryRolePermissionPaths(orgId int64, paths []string) errs.SystemErrorInfo
- func TransferOperationArr(optAuthArr []string) []string
- func UpdateOrgAdmin(userId int64, orgId int64, oldOwnerId, newOwnerId int64) (*vo.Void, errs.SystemErrorInfo)
- func UpdateRole(orgId int64, userId int64, input vo.UpdateRoleReq) (int64, errs.SystemErrorInfo)
- func UpdateRolePermissionOperation(orgId int64, userId int64, input vo.UpdateRolePermissionOperationReq) (*vo.Void, errs.SystemErrorInfo)
- func UpdateUserOrgRole(req rolevo.UpdateUserOrgRoleReqVo) (*vo.Void, errs.SystemErrorInfo)
- func UpdateUserOrgRoleBatch(req rolevo.UpdateUserOrgRoleBatchReqVo) (*vo.Void, errs.SystemErrorInfo)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssemblyOptAuthData ¶
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 ¶
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 ¶
去除了 rolesvc 后,导致引入的东西不存在,方法先注释
func GetOpSuffixOfOperation ¶
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 GetOrgRoleUser ¶
func GetPermissionCodeMap ¶
权限 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 GetRoleByLangCode ¶
查询系统定义角色
func GetRoleListByGroup ¶
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 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 ¶
将形如:`["Permission.Pro.Tag-Create,Modify,Delete"]` 的权限数组转换为 operation(格式是:`Permission.Pro.Tag.Create`) 一致的格式。
func UpdateOrgAdmin ¶
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)
func UpdateUserOrgRole ¶
func UpdateUserOrgRole(req rolevo.UpdateUserOrgRoleReqVo) (*vo.Void, errs.SystemErrorInfo)
func UpdateUserOrgRoleBatch ¶
func UpdateUserOrgRoleBatch(req rolevo.UpdateUserOrgRoleBatchReqVo) (*vo.Void, errs.SystemErrorInfo)
Types ¶
This section is empty.