aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/api/resource/PermissionsResource.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/api/resource/PermissionsResource.java b/src/main/java/org/traccar/api/resource/PermissionsResource.java
index 32cf4faff..7502e9134 100644
--- a/src/main/java/org/traccar/api/resource/PermissionsResource.java
+++ b/src/main/java/org/traccar/api/resource/PermissionsResource.java
@@ -77,8 +77,9 @@ public class PermissionsResource extends BaseResource {
permission.getPropertyClass(), permission.getPropertyId());
}
// we assume all permissions are of same type so we use the first one for refreshing
- if (!entities.isEmpty())
+ if (!entities.isEmpty()) {
Context.getPermissionsManager().refreshPermissions(new Permission(entities.get(0)));
+ }
return Response.noContent().build();
}
@@ -101,8 +102,9 @@ public class PermissionsResource extends BaseResource {
LogAction.unlink(getUserId(), permission.getOwnerClass(), permission.getOwnerId(),
permission.getPropertyClass(), permission.getPropertyId());
}
- if (!entities.isEmpty())
+ if (!entities.isEmpty()) {
Context.getPermissionsManager().refreshPermissions(new Permission(entities.get(0)));
+ }
return Response.noContent().build();
}