diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index 5a3be3b9..6b8c4223 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/cooperation/CoeCooperationAPIManager.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/cooperation/CoeCooperationAPIManager.java index ac37b9fe..04db42a2 100644 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/cooperation/CoeCooperationAPIManager.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/cooperation/CoeCooperationAPIManager.java @@ -805,7 +805,9 @@ public class CoeCooperationAPIManager { List teamModels = this.queryJoindTeamList(uid, true, true); for (CoeCooperationTeamModel teamModel: teamModels){ String teamId = teamModel.getId(); - List list = this.queryCooperationRoleDataPermByTeamUser(teamId, uid); +// List list = this.queryCooperationRoleDataPermByTeamUser(teamId, uid); + //使用用户权限获取小组下用户多角色文件访问权限 + Set list = CooperationCache.getUserDataVisitablePermission(teamId, uid, false); if (list.contains(plModel.getVersionId())){ return true; } diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/web/CoeDesignerWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/web/CoeDesignerWeb.java index f42b2983..b483ef84 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/web/CoeDesignerWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/web/CoeDesignerWeb.java @@ -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,17 +246,33 @@ public class CoeDesignerWeb extends ActionWeb { boolean outputPerm = true; if (UtilString.isNotEmpty(teamId)) { - CoeCooperationRoleModel role = CoeCooperationAPIManager.getInstance().queryCooperationRoleByUser(teamId, _uc.getUID()); - if (role != null) { - perms = role.getActionPerm(); - } - // 没有新建、修改权限则只读 - if (!role.getActionPerm().contains(CoeCooperationConst.ACTION_WRITE)) { - isView = true; - } - if (!"all".equals(role.getAppPerm()) && !role.getAppPerm().contains("com.actionsoft.apps.coe.pal.output")) { - outputPerm = false; + 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(); + } + // 没有新建、修改权限则只读 + if (!role.getActionPerm().contains(CoeCooperationConst.ACTION_WRITE)) { + isView = true; + } + if (!"all".equals(role.getAppPerm()) && !role.getAppPerm().contains("com.actionsoft.apps.coe.pal.output")) { + outputPerm = false; + } + }else { + //获取用户对应文件的操作权限 + Set fileActionPerm = CooperationCache.getUserDataOperatePermission(teamId, _uc.getUID(), plModel.getVersionId()); + perms = UtilString.join(fileActionPerm,","); + //没有文件新建、修改权限则只读 + if (fileActionPerm.contains(CoeCooperationConst.ACTION_WRITE)){ + isView = true; + } + Set userAPPPermission = CooperationCache.getUserAPPPermission(teamId, _uc.getUID()); + if (!userAPPPermission.contains("all") && !userAPPPermission.contains("com.actionsoft.apps.coe.pal.output")) { + outputPerm = false; + } } + } List versionModels = PALRepositoryCache.getByVersionId(plModel.getVersionId()); //按照版本号排序