打开设计页面接口内容权限控制调整
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);
|
List<CoeCooperationTeamModel> teamModels = this.queryJoindTeamList(uid, true, true);
|
||||||
for (CoeCooperationTeamModel teamModel: teamModels){
|
for (CoeCooperationTeamModel teamModel: teamModels){
|
||||||
String teamId = teamModel.getId();
|
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())){
|
if (list.contains(plModel.getVersionId())){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import java.util.Set;
|
|||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
|
||||||
import com.actionsoft.apps.coe.pal.cooperation.CoeCooperationAPIManager;
|
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.constant.CoeCooperationConst;
|
||||||
import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationRoleModel;
|
import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationRoleModel;
|
||||||
import com.actionsoft.apps.coe.pal.log.CoEOpLogAPI;
|
import com.actionsoft.apps.coe.pal.log.CoEOpLogAPI;
|
||||||
@ -245,17 +246,33 @@ public class CoeDesignerWeb extends ActionWeb {
|
|||||||
|
|
||||||
boolean outputPerm = true;
|
boolean outputPerm = true;
|
||||||
if (UtilString.isNotEmpty(teamId)) {
|
if (UtilString.isNotEmpty(teamId)) {
|
||||||
CoeCooperationRoleModel role = CoeCooperationAPIManager.getInstance().queryCooperationRoleByUser(teamId, _uc.getUID());
|
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
|
||||||
if (role != null) {
|
if (isOlderVersion){
|
||||||
perms = role.getActionPerm();
|
CoeCooperationRoleModel role = CoeCooperationAPIManager.getInstance().queryCooperationRoleByUser(teamId, _uc.getUID());
|
||||||
}
|
if (role != null) {
|
||||||
// 没有新建、修改权限则只读
|
perms = role.getActionPerm();
|
||||||
if (!role.getActionPerm().contains(CoeCooperationConst.ACTION_WRITE)) {
|
}
|
||||||
isView = true;
|
// 没有新建、修改权限则只读
|
||||||
}
|
if (!role.getActionPerm().contains(CoeCooperationConst.ACTION_WRITE)) {
|
||||||
if (!"all".equals(role.getAppPerm()) && !role.getAppPerm().contains("com.actionsoft.apps.coe.pal.output")) {
|
isView = true;
|
||||||
outputPerm = false;
|
}
|
||||||
|
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());
|
List<PALRepositoryModel> versionModels = PALRepositoryCache.getByVersionId(plModel.getVersionId());
|
||||||
//按照版本号排序
|
//按照版本号排序
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user