diff --git a/src/main/java/org/olat/repository/controllers/RepositoryDetailsController.java b/src/main/java/org/olat/repository/controllers/RepositoryDetailsController.java index dc16689b603d13370405f1bce3618ce222521fb6..85977ab79bdb404fb3b8278538f40e06b9526cf2 100644 --- a/src/main/java/org/olat/repository/controllers/RepositoryDetailsController.java +++ b/src/main/java/org/olat/repository/controllers/RepositoryDetailsController.java @@ -547,11 +547,9 @@ public class RepositoryDetailsController extends BasicController implements Gene boolean canCopy = repositoryEntry.getCanCopy(); if (isOwner) { if (isNewController) { - if(isAuthor) { - detailsToolC.addLink(ACTION_EDIT, translate("details.openeditor"), TOOL_EDIT, null, "o_sel_repo_open_editor", false); - detailsToolC.addLink(ACTION_EDITDESC, translate("details.chdesc"), TOOL_CHDESC, null, "o_sel_repo_edit_descritpion", false); - detailsToolC.addLink(ACTION_EDITPROP, translate("details.chprop"), TOOL_CHPROP, null, "o_sel_repor_edit_properties", false); - } + detailsToolC.addLink(ACTION_EDIT, translate("details.openeditor"), TOOL_EDIT, null, "o_sel_repo_open_editor", false); + detailsToolC.addLink(ACTION_EDITDESC, translate("details.chdesc"), TOOL_CHDESC, null, "o_sel_repo_edit_descritpion", false); + detailsToolC.addLink(ACTION_EDITPROP, translate("details.chprop"), TOOL_CHPROP, null, "o_sel_repor_edit_properties", false); detailsToolC.addLink(ACTION_ADD_CATALOG, translate("details.catadd"), TOOL_CATALOG, null, "o_sel_repo_add_to_catalog", false); detailsToolC.addHeader(translate("table.action")); @@ -596,12 +594,10 @@ public class RepositoryDetailsController extends BasicController implements Gene } // enable - if(isAuthor) { - boolean editManaged = RepositoryEntryManagedFlag.isManaged(repositoryEntry, RepositoryEntryManagedFlag.editcontent); - detailsToolC.setEnabled(TOOL_EDIT, handler.supportsEdit(repositoryEntry) && !corrupted && !editManaged); - detailsToolC.setEnabled(TOOL_CHDESC, !corrupted); - detailsToolC.setEnabled(TOOL_CHPROP, !corrupted); - } + boolean editManaged = RepositoryEntryManagedFlag.isManaged(repositoryEntry, RepositoryEntryManagedFlag.editcontent); + detailsToolC.setEnabled(TOOL_EDIT, handler.supportsEdit(repositoryEntry) && !corrupted && !editManaged); + detailsToolC.setEnabled(TOOL_CHDESC, !corrupted); + detailsToolC.setEnabled(TOOL_CHPROP, !corrupted); canCopy = true; } @@ -626,7 +622,7 @@ public class RepositoryDetailsController extends BasicController implements Gene if (repositoryEntry != null) { // The controller has already a repository-entry => do de-register it CoordinatorManager.getInstance().getCoordinator().getEventBus().deregisterFor(this, repositoryEntry); - } + } repositoryEntry = entry; CoordinatorManager.getInstance().getCoordinator().getEventBus().registerFor(this, ureq.getIdentity(), repositoryEntry); checkSecurity(ureq); @@ -778,7 +774,9 @@ public class RepositoryDetailsController extends BasicController implements Gene * @param contentController */ private void doEditSettings(UserRequest ureq, Controller contentController, String title) { - if (!isAuthor) throw new OLATSecurityException("Trying to edit properties , but user is not author: user = " + ureq.getIdentity()); + if (!isAuthor && !isOwner) { + throw new OLATSecurityException("Trying to edit properties , but user is not author: user = " + ureq.getIdentity()); + } Component component = contentController.getInitialComponent(); @@ -1188,7 +1186,7 @@ public class RepositoryDetailsController extends BasicController implements Gene * @return */ public ToolController getDetailsToolController() { - return this.detailsToolC; + return detailsToolC; } } \ No newline at end of file