小组权限调整,批量移动文件接口加入小组文件权限判断
This commit is contained in:
parent
9b975719e7
commit
0ecb3c124a
Binary file not shown.
@ -3160,9 +3160,9 @@ public class CoEPALController {
|
||||
* @return
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal_processlevel_move_save")
|
||||
public String movePalProcessLevelRepository(UserContext uc, String sourceData, String targetData) {
|
||||
public String movePalProcessLevelRepository(UserContext uc,String teamId, String sourceData, String targetData) {
|
||||
CoeProcessLevelWeb web = new CoeProcessLevelWeb(uc);
|
||||
return web.movePalProcessLevelRepository(sourceData, targetData);
|
||||
return web.movePalProcessLevelRepository(teamId ,sourceData, targetData);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -5,6 +5,7 @@ import com.actionsoft.apps.AppsConst;
|
||||
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.extend.CooperationAppManager;
|
||||
import com.actionsoft.apps.coe.pal.datamigration.aris.model.ObjDefModel;
|
||||
import com.actionsoft.apps.coe.pal.datamigration.aris.model.ObjOccModel;
|
||||
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
|
||||
@ -9338,7 +9339,7 @@ public String deleteReply(String replyid, String messageid) {
|
||||
* @param targetData 目标文件
|
||||
* @return
|
||||
*/
|
||||
public String movePalProcessLevelRepository(String sourceData, String targetData) {
|
||||
public String movePalProcessLevelRepository(String teamId ,String sourceData, String targetData) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
JSONObject targetObj = JSONArray.parseArray(targetData).getJSONObject(0);
|
||||
String targetId = targetObj.getString("id");
|
||||
@ -9349,10 +9350,23 @@ public String deleteReply(String replyid, String messageid) {
|
||||
if (targetId.equals(sourceArr.getJSONObject(0).getString("pid"))) {
|
||||
return ResponseObject.newErrResponse("移动的文件已经在目标文件里面,不需要移动").toString();
|
||||
}
|
||||
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
|
||||
List<PALRepositoryModel> sourceList = new ArrayList<>();
|
||||
for (int i = 0; i < sourceArr.size(); i++) {
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(sourceArr.getJSONObject(i).getString("id"));
|
||||
sourceList.add(model);
|
||||
if (!isOlderVersion){
|
||||
ResponseObject res = ResponseObject.newOkResponse();
|
||||
CoeCooperationAPIManager.getInstance().queryCooperationFileActionPerm(teamId, _uc.getUID(),model.getVersionId(),res);
|
||||
Map<String,Boolean> map = (Map) res.getData();
|
||||
if (map.get("havingWritePerm")){
|
||||
sourceList.add(model);
|
||||
}
|
||||
}else {
|
||||
sourceList.add(model);
|
||||
}
|
||||
}
|
||||
if (!isOlderVersion && sourceList.isEmpty()){
|
||||
return ResponseObject.newErrResponse("移动文件失败,无操作权限").toString();
|
||||
}
|
||||
Collections.sort(sourceList, new ComparatorMap());
|
||||
|
||||
|
||||
@ -1615,6 +1615,7 @@
|
||||
<param name="shapeIds"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.coe.pal_processlevel_move_save">
|
||||
<param name="teamId"/>
|
||||
<param name="sourceData"/>
|
||||
<param name="targetData"/>
|
||||
</cmd-bean>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user