diff options
author | Abyss777 <abyss@fox5.ru> | 2017-07-21 18:41:49 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-07-21 18:41:49 +0500 |
commit | 69c46399ee0f6b3dd2b0589cb412e9e17f040369 (patch) | |
tree | 4d838e7c52df78acaae804eaa08911825edc0acd /src/org/traccar/api/resource/AttributeResource.java | |
parent | 55d91ec7a86777bb0427422c15c2b8a60aa00071 (diff) | |
download | trackermap-server-69c46399ee0f6b3dd2b0589cb412e9e17f040369.tar.gz trackermap-server-69c46399ee0f6b3dd2b0589cb412e9e17f040369.tar.bz2 trackermap-server-69c46399ee0f6b3dd2b0589cb412e9e17f040369.zip |
Use classes instead of constants everywhere
Diffstat (limited to 'src/org/traccar/api/resource/AttributeResource.java')
-rw-r--r-- | src/org/traccar/api/resource/AttributeResource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/api/resource/AttributeResource.java b/src/org/traccar/api/resource/AttributeResource.java index 63cdfb2a7..7e6947d26 100644 --- a/src/org/traccar/api/resource/AttributeResource.java +++ b/src/org/traccar/api/resource/AttributeResource.java @@ -87,7 +87,7 @@ public class AttributeResource extends BaseResource { private Response add(Attribute entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); Context.getAttributesManager().addItem(entity); - linkNew(entity); + linkNewEntity(entity); Context.getAttributesManager().refreshUserItems(); return Response.ok(entity).build(); } @@ -128,7 +128,7 @@ public class AttributeResource extends BaseResource { @PUT public Response update(Attribute entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); - Context.getPermissionsManager().checkPermission(Context.TYPE_ATTRIBUTE, getUserId(), entity.getId()); + Context.getPermissionsManager().checkPermission(Attribute.class, 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(Context.TYPE_ATTRIBUTE, getUserId(), id); + Context.getPermissionsManager().checkPermission(Attribute.class, getUserId(), id); Context.getAttributesManager().removeItem(id); return Response.noContent().build(); } |