Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
import org.exoplatform.services.cms.documents.AutoVersionService;
import org.exoplatform.services.cms.drives.DriveData;
import org.exoplatform.services.cms.drives.ManageDriveService;
import org.exoplatform.services.cms.drives.impl.ManageDriveServiceImpl;

Check warning on line 66 in core/viewer/src/main/java/org/exoplatform/ecm/connector/platform/ManageDocumentService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'org.exoplatform.services.cms.drives.impl.ManageDriveServiceImpl'.

See more on https://sonarcloud.io/project/issues?id=org.exoplatform.ecms&issues=AZz1-T8Yx5abcyrzF88J&open=AZz1-T8Yx5abcyrzF88J&pullRequest=2548
import org.exoplatform.services.cms.impl.Utils;
import org.exoplatform.services.cms.link.LinkManager;
import org.exoplatform.services.context.DocumentContext;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.access.PermissionType;
import org.exoplatform.services.jcr.core.ExtendedNode;

Check warning on line 72 in core/viewer/src/main/java/org/exoplatform/ecm/connector/platform/ManageDocumentService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'org.exoplatform.services.jcr.core.ExtendedNode'.

See more on https://sonarcloud.io/project/issues?id=org.exoplatform.ecms&issues=AZz1-T8Yx5abcyrzF88K&open=AZz1-T8Yx5abcyrzF88K&pullRequest=2548
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.ext.common.SessionProvider;
import org.exoplatform.services.log.ExoLogger;
Expand Down Expand Up @@ -743,12 +743,8 @@
newNode.setProperty(NodetypeConstant.EXO_TITLE, org.exoplatform.services.cms.impl.Utils.cleanDocumentTitle(folder));

// Update permissions
if (newNode.canAddMixin("exo:privilegeable")) {
newNode.addMixin("exo:privilegeable");
}
String groupId = driveData.getParameters().get(ManageDriveServiceImpl.DRIVE_PARAMATER_GROUP_ID);
if(StringUtils.isNotBlank(groupId) && groupId.startsWith("/spaces/")) {
((ExtendedNode) newNode).setPermission("*:" + groupId, new String[]{PermissionType.READ, PermissionType.ADD_NODE, PermissionType.SET_PROPERTY});
if (newNode.canAddMixin("mix:referenceable")) {
newNode.addMixin("mix:referenceable");
}

node.save();
Expand Down
Loading