aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authormeysamrt <46737899+MeysamRT76@users.noreply.github.com>2024-02-19 08:54:26 +0330
committerGitHub <noreply@github.com>2024-02-19 08:54:26 +0330
commit15a478a959ea6ff4000c6b14d54edc9d2c37e06d (patch)
tree70dab18c6859beda77a7c2b4823818c7c8028434 /src/main/java
parent5a5a0e43d3b123780775f723c1c35a417a4e8265 (diff)
downloadtrackermap-server-15a478a959ea6ff4000c6b14d54edc9d2c37e06d.tar.gz
trackermap-server-15a478a959ea6ff4000c6b14d54edc9d2c37e06d.tar.bz2
trackermap-server-15a478a959ea6ff4000c6b14d54edc9d2c37e06d.zip
Update ServerResource.java
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/api/resource/ServerResource.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/api/resource/ServerResource.java b/src/main/java/org/traccar/api/resource/ServerResource.java
index 76c8e14c7..2a72d2773 100644
--- a/src/main/java/org/traccar/api/resource/ServerResource.java
+++ b/src/main/java/org/traccar/api/resource/ServerResource.java
@@ -93,8 +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 && user.getAdministrator()) {
- server.setStorageSpace(Log.getStorageSpace());
+ if (user != null) {
+ if (user.getAdministrator()) {
+ server.setStorageSpace(Log.getStorageSpace());
+ }
} else {
server.setNewServer(UserUtil.isEmpty(storage));
}