aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/AttributeResource.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/api/resource/AttributeResource.java')
-rw-r--r--src/org/traccar/api/resource/AttributeResource.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/api/resource/AttributeResource.java b/src/org/traccar/api/resource/AttributeResource.java
index c6c95e05c..63cdfb2a7 100644
--- a/src/org/traccar/api/resource/AttributeResource.java
+++ b/src/org/traccar/api/resource/AttributeResource.java
@@ -128,7 +128,7 @@ public class AttributeResource extends BaseResource {
@PUT
public Response update(Attribute entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
- Context.getPermissionsManager().checkPermission("attribute", getUserId(), entity.getId());
+ Context.getPermissionsManager().checkPermission(Context.TYPE_ATTRIBUTE, getUserId(), entity.getId());
Context.getAttributesManager().updateItem(entity);
return Response.ok(entity).build();
}
@@ -137,7 +137,7 @@ public class AttributeResource extends BaseResource {
@DELETE
public Response remove(@PathParam("id") long id) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
- Context.getPermissionsManager().checkPermission("attribute", getUserId(), id);
+ Context.getPermissionsManager().checkPermission(Context.TYPE_ATTRIBUTE, getUserId(), id);
Context.getAttributesManager().removeItem(id);
return Response.noContent().build();
}