|
|
|
@ -12,6 +12,7 @@ import au.com.royalpay.payment.manage.permission.manager.scanner.PermissionPartn
|
|
|
|
|
import au.com.royalpay.payment.manage.system.core.PermissionClientModulesService;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.id.IdUtil;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
@ -175,7 +176,7 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@CacheEvict(value = ":login:managers:", allEntries = true)
|
|
|
|
|
@CacheEvict(value = ":login:partners:", allEntries = true)
|
|
|
|
|
public void setFunctionModule(String funcId, String moduleName) {
|
|
|
|
|
if (moduleName == null) {
|
|
|
|
|
throw new BadRequestException("module name not provided");
|
|
|
|
@ -204,10 +205,11 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional
|
|
|
|
|
@CacheEvict(value = ":login:managers:", allEntries = true)
|
|
|
|
|
public void authorizeRole(ManagerRole role, List<String> functions) {
|
|
|
|
|
permissionPartnerFunctionMapper.clearRolePermission(role.getInverseMask());
|
|
|
|
|
permissionPartnerFunctionMapper.authorizeRole(role.getMask(), functions);
|
|
|
|
|
@CacheEvict(value = ":login:partners:", allEntries = true)
|
|
|
|
|
public void authorizeRole(PartnerRole role, List<String> functions) {
|
|
|
|
|
|
|
|
|
|
permissionPartnerFunctionMapper.clearRolePermission(role.getCode());
|
|
|
|
|
permissionPartnerFunctionMapper.authorizeRole(role.getCode(), functions);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|