Skip to content

Commit

Permalink
Showing 4 changed files with 9 additions and 5 deletions.
@@ -39,14 +39,16 @@ class DevConfig {
def users = [new User().with {
username = 'admin'
password = '{noop}adminpass'
name = 'Joe the admin'
firstName = 'Joe'
lastName = 'Doe'
emailAddress = 'joe@institution.edu'
roles.add(new Role(name: 'ROLE_ADMIN'))
it
}, new User().with {
username = 'nonadmin'
password = '{noop}nonadminpass'
name = 'Peter non admin'
firstName = 'Peter'
lastName = 'Vandelay'
emailAddress = 'peter@institution.edu'
roles.add(new Role(name: 'ROLE_USER'))
it
@@ -14,7 +14,7 @@
* @author Dmitriy Kopylenko
*/
@RestController
@RequestMapping("/api/security/users")
@RequestMapping("/api/admin/users")
public class UsersController {

private UserRepository userRepository;
@@ -34,7 +34,9 @@ public class User extends AbstractAuditable {
@Column(nullable = false)
private String password;

private String name;
private String firstName;

private String lastName;

private String emailAddress;

@@ -16,7 +16,7 @@ class UsersControllerIntegrationTests extends Specification {
@Autowired
private TestRestTemplate restTemplate

static RESOURCE_URI = '/api/security/users'
static RESOURCE_URI = '/api/admin/users'

def "GET users"() {
when: 'GET request is made for ALL users in the system'

0 comments on commit 44e957a

Please sign in to comment.