aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/api/resource/ServerResource.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/api/resource/ServerResource.java b/src/main/java/org/traccar/api/resource/ServerResource.java
index 66ecc74e1..76c8e14c7 100644
--- a/src/main/java/org/traccar/api/resource/ServerResource.java
+++ b/src/main/java/org/traccar/api/resource/ServerResource.java
@@ -93,15 +93,10 @@ public class ServerResource extends BaseResource {
server.setOpenIdEnabled(openIdProvider != null);
server.setOpenIdForce(openIdProvider != null && openIdProvider.getForce());
User user = permissionsService.getUser(getUserId());
- if (user != null) {
- if (user.getAdministrator()) {
- server.setStorageSpace(Log.getStorageSpace());
- }
- } else {
- server.setNewServer(UserUtil.isEmpty(storage));
- }
if (user != null && user.getAdministrator()) {
server.setStorageSpace(Log.getStorageSpace());
+ } else {
+ server.setNewServer(UserUtil.isEmpty(storage));
}
return server;
}