diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-22 10:55:48 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-22 10:55:48 -0700 |
commit | 9f8a78e5b7afddc6ccb0a54f4b3e59e1395de8eb (patch) | |
tree | 26356ca17e21d626843671aac23bf775c6451359 /src/main/java/org/traccar/api/BaseResource.java | |
parent | d9f51795058399e85ae83a8e308a0c2bc1d13e4b (diff) | |
parent | 9c9f5d66147cfa428ea18dd29103b9c82e529dca (diff) | |
download | trackermap-server-9f8a78e5b7afddc6ccb0a54f4b3e59e1395de8eb.tar.gz trackermap-server-9f8a78e5b7afddc6ccb0a54f4b3e59e1395de8eb.tar.bz2 trackermap-server-9f8a78e5b7afddc6ccb0a54f4b3e59e1395de8eb.zip |
Merge branch 'storage'
Diffstat (limited to 'src/main/java/org/traccar/api/BaseResource.java')
-rw-r--r-- | src/main/java/org/traccar/api/BaseResource.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/BaseResource.java b/src/main/java/org/traccar/api/BaseResource.java index 6dff8c8c3..33abe73fa 100644 --- a/src/main/java/org/traccar/api/BaseResource.java +++ b/src/main/java/org/traccar/api/BaseResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2022 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,11 @@ */ package org.traccar.api; +import org.traccar.api.security.PermissionsService; import org.traccar.api.security.UserPrincipal; +import org.traccar.storage.Storage; +import javax.inject.Inject; import javax.ws.rs.core.Context; import javax.ws.rs.core.SecurityContext; @@ -25,6 +28,12 @@ public class BaseResource { @Context private SecurityContext securityContext; + @Inject + protected Storage storage; + + @Inject + protected PermissionsService permissionsService; + protected long getUserId() { UserPrincipal principal = (UserPrincipal) securityContext.getUserPrincipal(); if (principal != null) { @@ -32,4 +41,5 @@ public class BaseResource { } return 0; } + } |