-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for remoteUser in localDevMode
- Loading branch information
Showing
6 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,24 @@ void createWithAPIUser() throws Exception { | |
.as(new TypeRef<>() { | ||
}); | ||
assertNotNull(newRole.getId()); | ||
System.out.println(objectMapper.writeValueAsString(newRole)); | ||
} | ||
|
||
@Test | ||
void createWithAPIUserNotAllowed() { | ||
Role role = new Role("Required role name", "Required role description", application("3", EntityType.SAML20_SP), | ||
365, false, false); | ||
|
||
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("3")); | ||
|
||
given() | ||
.when() | ||
.auth().preemptive().basic("sp_dashboard", "secret") | ||
.accept(ContentType.JSON) | ||
.contentType(ContentType.JSON) | ||
.body(role) | ||
.post("/api/internal/invite/roles") | ||
.then() | ||
.statusCode(403); | ||
} | ||
|
||
@Test | ||
|
@@ -191,14 +208,4 @@ void userRolesByRole() { | |
assertEquals(1, userRoles.size()); | ||
} | ||
|
||
@Test | ||
void delme() throws JsonProcessingException { | ||
InvitationResponse invitationResponse = new InvitationResponse( | ||
201, | ||
List.of(new RecipientInvitationURL("[email protected]", "https://invite.test.surfconext.nl/invitation/accept?{hash}")) | ||
); | ||
String json = objectMapper.writeValueAsString(invitationResponse); | ||
System.out.println(json); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters