aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/BaseResource.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-01 11:00:17 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-01 11:00:17 +1300
commit7575edbee87f9fbe4770c988b469f5915d85bb51 (patch)
treedd71bd4288976fc8f2bdf146d27c5d4964a15217 /src/org/traccar/api/BaseResource.java
parent2ba060bc29ee529c5492b098b21927e15d815cb1 (diff)
downloadtrackermap-server-7575edbee87f9fbe4770c988b469f5915d85bb51.tar.gz
trackermap-server-7575edbee87f9fbe4770c988b469f5915d85bb51.tar.bz2
trackermap-server-7575edbee87f9fbe4770c988b469f5915d85bb51.zip
Move role definitions to user model
Diffstat (limited to 'src/org/traccar/api/BaseResource.java')
-rw-r--r--src/org/traccar/api/BaseResource.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/api/BaseResource.java b/src/org/traccar/api/BaseResource.java
index 54d606ab6..6051fdb61 100644
--- a/src/org/traccar/api/BaseResource.java
+++ b/src/org/traccar/api/BaseResource.java
@@ -22,6 +22,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import org.traccar.Context;
import org.traccar.helper.Clazz;
+import org.traccar.model.User;
public class BaseResource<T, I> {
@@ -45,7 +46,7 @@ public class BaseResource<T, I> {
}
public T getEntity(I id) {
- validateSecurityContext(ApplicationRole.USER, id);
+ validateSecurityContext(User.ROLE_USER, id);
T entity = Clazz.newInstance(clazz);
try {
Clazz.setId(entity, id);