RED-9393 user stats controller
This commit is contained in:
parent
c28076df68
commit
61e557712b
@ -1,10 +1,13 @@
|
|||||||
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
|
package com.iqser.red.persistence.service.v1.external.api.impl.controller;
|
||||||
|
|
||||||
|
import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.READ_USER_STATS;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.iqser.red.service.persistence.management.v1.processor.acl.custom.dossier.DossierACLService;
|
import com.iqser.red.service.persistence.management.v1.processor.acl.custom.dossier.DossierACLService;
|
||||||
@ -30,6 +33,7 @@ public class UserStatsController implements UserStatsResource {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@PreAuthorize("hasAuthority('" + READ_USER_STATS + "')")
|
||||||
public ResponseEntity<UserStats> getUserStats(String userId) {
|
public ResponseEntity<UserStats> getUserStats(String userId) {
|
||||||
|
|
||||||
if (userService.getUserById(userId).isEmpty()) {
|
if (userService.getUserById(userId).isEmpty()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user