Skip to content

Commit

Permalink
SHIBUI-1031: 1034
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Dec 12, 2018
1 parent e1c8907 commit 44e957a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @author Dmitriy Kopylenko
*/
@RestController
@RequestMapping("/api/security/users")
@RequestMapping("/api/admin/users")
public class UsersController {

private UserRepository userRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 44e957a

Please sign in to comment.