打开设计页面接口内容权限控制调整
This commit is contained in:
parent
a620b40a07
commit
db8b5e6f30
Binary file not shown.
@ -805,7 +805,9 @@ public class CoeCooperationAPIManager {
|
||||
List<CoeCooperationTeamModel> teamModels = this.queryJoindTeamList(uid, true, true);
|
||||
for (CoeCooperationTeamModel teamModel: teamModels){
|
||||
String teamId = teamModel.getId();
|
||||
List<String> list = this.queryCooperationRoleDataPermByTeamUser(teamId, uid);
|
||||
// List<String> list = this.queryCooperationRoleDataPermByTeamUser(teamId, uid);
|
||||
//使用用户权限获取小组下用户多角色文件访问权限
|
||||
Set<String> list = CooperationCache.getUserDataVisitablePermission(teamId, uid, false);
|
||||
if (list.contains(plModel.getVersionId())){
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@ import java.util.Set;
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.cooperation.CoeCooperationAPIManager;
|
||||
import com.actionsoft.apps.coe.pal.cooperation.cache.CooperationCache;
|
||||
import com.actionsoft.apps.coe.pal.cooperation.constant.CoeCooperationConst;
|
||||
import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationRoleModel;
|
||||
import com.actionsoft.apps.coe.pal.log.CoEOpLogAPI;
|
||||
@ -245,6 +246,8 @@ public class CoeDesignerWeb extends ActionWeb {
|
||||
|
||||
boolean outputPerm = true;
|
||||
if (UtilString.isNotEmpty(teamId)) {
|
||||
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
|
||||
if (isOlderVersion){
|
||||
CoeCooperationRoleModel role = CoeCooperationAPIManager.getInstance().queryCooperationRoleByUser(teamId, _uc.getUID());
|
||||
if (role != null) {
|
||||
perms = role.getActionPerm();
|
||||
@ -256,6 +259,20 @@ public class CoeDesignerWeb extends ActionWeb {
|
||||
if (!"all".equals(role.getAppPerm()) && !role.getAppPerm().contains("com.actionsoft.apps.coe.pal.output")) {
|
||||
outputPerm = false;
|
||||
}
|
||||
}else {
|
||||
//获取用户对应文件的操作权限
|
||||
Set<String> fileActionPerm = CooperationCache.getUserDataOperatePermission(teamId, _uc.getUID(), plModel.getVersionId());
|
||||
perms = UtilString.join(fileActionPerm,",");
|
||||
//没有文件新建、修改权限则只读
|
||||
if (fileActionPerm.contains(CoeCooperationConst.ACTION_WRITE)){
|
||||
isView = true;
|
||||
}
|
||||
Set<String> userAPPPermission = CooperationCache.getUserAPPPermission(teamId, _uc.getUID());
|
||||
if (!userAPPPermission.contains("all") && !userAPPPermission.contains("com.actionsoft.apps.coe.pal.output")) {
|
||||
outputPerm = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
List<PALRepositoryModel> versionModels = PALRepositoryCache.getByVersionId(plModel.getVersionId());
|
||||
//按照版本号排序
|
||||
|
||||
Loading…
Reference in New Issue
Block a user