mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
Fix unit test
This commit is contained in:
@@ -159,7 +159,7 @@ public class GitConfigResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SubjectAware(username = "writeOnly")
|
@SubjectAware(username = "readWrite")
|
||||||
public void shouldReadDefaultRepositoryConfig() throws URISyntaxException, UnsupportedEncodingException {
|
public void shouldReadDefaultRepositoryConfig() throws URISyntaxException, UnsupportedEncodingException {
|
||||||
when(repositoryManager.get(new NamespaceAndName("space", "X"))).thenReturn(new Repository("id", "git", "space", "X"));
|
when(repositoryManager.get(new NamespaceAndName("space", "X"))).thenReturn(new Repository("id", "git", "space", "X"));
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ public class GitConfigResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SubjectAware(username = "writeOnly")
|
@SubjectAware(username = "readOnly")
|
||||||
public void shouldReadStoredRepositoryConfig() throws URISyntaxException, UnsupportedEncodingException {
|
public void shouldReadStoredRepositoryConfig() throws URISyntaxException, UnsupportedEncodingException {
|
||||||
when(repositoryManager.get(new NamespaceAndName("space", "X"))).thenReturn(new Repository("id", "git", "space", "X"));
|
when(repositoryManager.get(new NamespaceAndName("space", "X"))).thenReturn(new Repository("id", "git", "space", "X"));
|
||||||
GitRepositoryConfig gitRepositoryConfig = new GitRepositoryConfig();
|
GitRepositoryConfig gitRepositoryConfig = new GitRepositoryConfig();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ admin = secret, admin
|
|||||||
[roles]
|
[roles]
|
||||||
reader = configuration:read:git
|
reader = configuration:read:git
|
||||||
writer = configuration:write:git
|
writer = configuration:write:git
|
||||||
readerWriter = configuration:*:git
|
readerWriter = configuration:*:git,repository:*:id
|
||||||
admin = *
|
admin = *
|
||||||
repoRead = repository:read:*
|
repoRead = repository:read:*
|
||||||
repoWrite = repository:modify:*
|
repoWrite = repository:modify:*
|
||||||
|
|||||||
Reference in New Issue
Block a user