@Test @WithMockUser(value = TEST_USER) public void getUserContextShouldWorkForAnyUserTest() { userSecurityService.getUserContext(); }
@PreAuthorize(ROLE_USER) public UserContext getUserContext() { return authManager.getUserContext(); }
UserSecurityService { @PreAuthorize(ROLE_USER) public UserContext getUserContext() { return authManager.getUserContext(); } }
UserSecurityService { @PreAuthorize(ROLE_USER) public UserContext getUserContext() { return authManager.getUserContext(); } @Autowired  UserSecurityService(UserManager userManager, AuthManager authManager); }
UserSecurityService { @PreAuthorize(ROLE_USER) public UserContext getUserContext() { return authManager.getUserContext(); } @Autowired  UserSecurityService(UserManager userManager, AuthManager authManager); @PreAuthorize(ROLE_ADMIN) List<NgbUser> loadAllUsers(); @PreAuthorize(ROLE_ADMIN) NgbUser loadUserByName(String name); @PreAuthorize(ROLE_ADMIN) NgbUser createUser(NgbUserVO userVO); @PreAuthorize(ROLE_ADMIN) NgbUser updateUser(final Long id, final NgbUserVO userVO); @PreAuthorize(ROLE_ADMIN) NgbUser loadUser(Long id); @PreAuthorize(ROLE_ADMIN) void deleteUser(Long id); @PreAuthorize(ROLE_ADMIN) NgbUser updateUserRoles(Long id, List<Long> roles); @PreAuthorize(ROLE_ADMIN) List<NgbUser> loadUsers(); @PreAuthorize(ROLE_USER) JwtRawToken issueTokenForCurrentUser(Long expiration); @PreAuthorize(ROLE_USER) UserContext getUserContext(); @PreAuthorize(ROLE_ADMIN) Collection<NgbUser> loadUsersByNames(IDList userList); @PreAuthorize(ROLE_ADMIN) Collection<String> findGroups(final String prefix); }
UserSecurityService { @PreAuthorize(ROLE_USER) public UserContext getUserContext() { return authManager.getUserContext(); } @Autowired  UserSecurityService(UserManager userManager, AuthManager authManager); @PreAuthorize(ROLE_ADMIN) List<NgbUser> loadAllUsers(); @PreAuthorize(ROLE_ADMIN) NgbUser loadUserByName(String name); @PreAuthorize(ROLE_ADMIN) NgbUser createUser(NgbUserVO userVO); @PreAuthorize(ROLE_ADMIN) NgbUser updateUser(final Long id, final NgbUserVO userVO); @PreAuthorize(ROLE_ADMIN) NgbUser loadUser(Long id); @PreAuthorize(ROLE_ADMIN) void deleteUser(Long id); @PreAuthorize(ROLE_ADMIN) NgbUser updateUserRoles(Long id, List<Long> roles); @PreAuthorize(ROLE_ADMIN) List<NgbUser> loadUsers(); @PreAuthorize(ROLE_USER) JwtRawToken issueTokenForCurrentUser(Long expiration); @PreAuthorize(ROLE_USER) UserContext getUserContext(); @PreAuthorize(ROLE_ADMIN) Collection<NgbUser> loadUsersByNames(IDList userList); @PreAuthorize(ROLE_ADMIN) Collection<String> findGroups(final String prefix);  }