public abstract class AbstractOrgService<J extends AbstractPositionEntity,P extends AbstractPersonAccountEntity<J>> extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected OrganizationRepo |
organizationRepo |
protected AbstractPersonAccountRepo<P> |
personAccountRepo |
protected Token |
token |
| 构造器和说明 |
|---|
AbstractOrgService() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected OrganizationEntity |
checkBelongToExists(String belongTo)
归属组织是否存在,部门管理服务使用
|
protected void |
checkDuplication(String higherLevel,
String name,
String id)
检查同一组织下是否存在重名的组织
|
protected void |
checkManagementPermission(String orgId)
检查是否具有管理orgId的权限
优先级:
[管理所有组织]
AccessAllow.PREROGATIVE
SYSTEM_MANAGER
[租户管理员,需要验证所操作的组织是否为租户的组织,新建顶级单位时,需要确定租户的appSet是否和当前appSet相同]
TENANT_MANAGER
[指定组织,根据职位的的权限进行判定,当人员的职位上有ORGANIZATION_MANAGER角色时,则人员拥有职位所属组织及其下级的管理权]
ORGANIZATION_MANAGER
|
protected void |
circleCheck(OrganizationEntity higherLevelEntity,
String id)
循环检查,递归线性上级是否存在自己的id
|
protected Token token
@Inject protected OrganizationRepo organizationRepo
@Inject protected AbstractPersonAccountRepo<P extends AbstractPersonAccountEntity<J>> personAccountRepo
protected void checkManagementPermission(String orgId)
orgId - protected void circleCheck(OrganizationEntity higherLevelEntity, String id)
higherLevelEntity - id - protected void checkDuplication(String higherLevel, String name, String id)
higherLevel - name - id - protected OrganizationEntity checkBelongToExists(String belongTo)
belongTo - Copyright © 2018. All rights reserved.