diff --git a/src/main/java/org/genesys2/server/api/v1/PermissionController.java b/src/main/java/org/genesys2/server/api/v1/PermissionController.java index 970bc94894d450dac5dcddb39a7dab994debeac8..b70ae118346d18bb2d0f9fe5985c52067e12e5ab 100644 --- a/src/main/java/org/genesys2/server/api/v1/PermissionController.java +++ b/src/main/java/org/genesys2/server/api/v1/PermissionController.java @@ -187,12 +187,8 @@ public class PermissionController { * * @param term the term * @return the map - * @deprecated Will be deprecated in 1.7 */ - @Deprecated - // TODO remove - @GetMapping(value = "/autocompleteuser", produces = MediaType.APPLICATION_JSON_VALUE) - public Map acUser(@RequestParam("term") final String term) { + private Map acUser(@RequestParam("term") final String term) { final Map userIds = new HashMap<>(); for (final User user : userService.autocompleteUser(term, 10)) { userIds.put(user.getEmail(), user.getId()); @@ -205,12 +201,8 @@ public class PermissionController { * * @param term the term * @return the map - * @deprecated Will be deprecated in 1.7 */ - @Deprecated - // TODO remove - @GetMapping(value = "/autocompleterole", produces = MediaType.APPLICATION_JSON_VALUE) - public Map acRole(@RequestParam("term") final String term) { + private Map acRole(@RequestParam("term") final String term) { final Map roleSids = new HashMap<>(); final List matchingRoles = Arrays.stream(UserRole.values()).filter(role -> role.name().toLowerCase().startsWith(term.toLowerCase())).collect(Collectors.toList()); @@ -227,12 +219,8 @@ public class PermissionController { * * @param term the term * @return the map - * @deprecated Will be deprecated in 1.7 */ - @Deprecated - // TODO remove - @GetMapping(value = "/autocomplete-oauth-client", produces = MediaType.APPLICATION_JSON_VALUE) - public Map acOauthClient(@RequestParam("term") final String term) { + private Map acOauthClient(@RequestParam("term") final String term) { final Map oauthMap = new HashMap<>(); for (final OAuthClient client : clientDetailsService.autocompleteClients(term, 10)) { oauthMap.put(client.getTitle(), client.getId()); diff --git a/src/main/java/org/genesys2/spring/config/ApplicationUpgrades.java b/src/main/java/org/genesys2/spring/config/ApplicationUpgrades.java index 56f2a67ac3933ac8e76b22422bd5e1668dd0a947..5ebf86242772d136b883853894ac6c33416ffd5a 100644 --- a/src/main/java/org/genesys2/spring/config/ApplicationUpgrades.java +++ b/src/main/java/org/genesys2/spring/config/ApplicationUpgrades.java @@ -86,6 +86,7 @@ public class ApplicationUpgrades implements InitializingBean { for (RepositoryFolder repositoryFolder : repositoryService.getFolders(Paths.get("/"))) { LOG.warn("Making {} publicly readable", repositoryFolder.getPath()); aclService.addCreatorPermissions(repositoryFolder); + aclService.makePubliclyReadable(repositoryFolder, true); repositoryService.listPaths(repositoryFolder.getFolderPath()).forEach(subFolder -> { aclService.addCreatorPermissions(subFolder); diff --git a/src/main/webapp/WEB-INF/jsp/acl/editor.jsp b/src/main/webapp/WEB-INF/jsp/acl/editor.jsp index f4ffbc51291cd06d4aa6bfa0e5562d5a0134f29b..980eb4a2a32cfa5088ef9d5dc81f03315cc2b21f 100644 --- a/src/main/webapp/WEB-INF/jsp/acl/editor.jsp +++ b/src/main/webapp/WEB-INF/jsp/acl/editor.jsp @@ -92,7 +92,7 @@ @@ -145,13 +145,14 @@ beforeSend: function (xhr) { }, - success: function (respObject) { + /* success: function (respObject) { window.location.reload(); console.log(respObject); - }, + }, */ error: function (jqXHR, textStatus, errorThrown) { console.log(textStatus); console.log(errorThrown); + window.location.reload(); } }); }); @@ -177,13 +178,14 @@ beforeSend: function (xhr) { }, - success: function (respObject) { + /* success: function (respObject) { window.location.reload(); console.log(respObject); - }, + }, */ error: function (jqXHR, textStatus, errorThrown) { console.log(textStatus); console.log(errorThrown); + window.location.reload(); } }); }); @@ -214,13 +216,14 @@ beforeSend : function(xhr) { }, - success : function(respObject) { + /* success : function(respObject) { window.location.reload(); console.log(respObject); - }, + }, */ error: function(jqXHR, textStatus, errorThrown) { console.log(textStatus); console.log(errorThrown); + window.location.reload(); } }); }); @@ -253,13 +256,14 @@ beforeSend : function(xhr) { }, - success : function(respObject) { + /* success : function(respObject) { window.location.reload(); console.log(respObject); - }, + }, */ error: function(jqXHR, textStatus, errorThrown) { console.log(textStatus); console.log(errorThrown); + window.location.reload(); } }); });