Commit d0e2612d authored by Matija Obreza's avatar Matija Obreza

Fix: Execute repository upgrade as asAdmin

parent 66c40d42
......@@ -103,7 +103,7 @@ public class AppliedFiltersConverter {
}
public static AccessionFilter convert(AppliedFilters filters) throws Exception {
LOG.debug("Converting {}", filters.toString());
LOG.trace("Converting {}", filters.toString());
AccessionFilter f = new AccessionFilter();
......@@ -170,6 +170,8 @@ public class AppliedFiltersConverter {
}
}
LOG.debug("Converted {} to {}", filters.toString(), f.toString());
return f;
}
......
......@@ -78,11 +78,11 @@ public class ApplicationUpgrades implements InitializingBean {
@Bean
protected RepositoryUpgrade20180920 afterRepositoryUpgrade20180920(RepositoryUpgrade20180920 repositoryUpgrade20180920) throws Exception {
repositoryUpgrade20180920.doUpgrade();
LOG.warn("Updating permissions on public folders");
asAdminInvoker.invoke(() -> {
repositoryUpgrade20180920.doUpgrade();
LOG.warn("Updating permissions on public folders");
for (RepositoryFolder repositoryFolder : repositoryService.getFolders(Paths.get("/"))) {
LOG.warn("Making {} publicly readable", repositoryFolder.getPath());
aclService.addCreatorPermissions(repositoryFolder);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment