Fix role hierarchy (missing new line) (#2689)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -54,9 +54,7 @@ class PreAuthorizeEnabledTest extends AbstractSecurityTest {
|
||||
* Tests whether request returns distribution set if a role with scope is granted for the user
|
||||
*/
|
||||
@Test
|
||||
@WithUser(authorities = {
|
||||
"CREATE_DISTRIBUTION_SET", "READ_DISTRIBUTION_SET_TYPE",
|
||||
SpPermission.READ_DISTRIBUTION_SET + "/name==DsOne" }, autoCreateTenant = false)
|
||||
@WithUser(authorities = { "CREATE_DISTRIBUTION_SET", SpPermission.READ_DISTRIBUTION_SET + "/name==DsOne" }, autoCreateTenant = false)
|
||||
void successIfHasRoleWithScope() throws Exception {
|
||||
createDsOne("successIfHasRoleWithScope");
|
||||
mvc.perform(get("/rest/v1/distributionsets")).andExpect(result -> {
|
||||
@@ -69,9 +67,7 @@ class PreAuthorizeEnabledTest extends AbstractSecurityTest {
|
||||
* Tests whether request doesn't return distribution set if a role with scope doesn't grant access
|
||||
*/
|
||||
@Test
|
||||
@WithUser(authorities = {
|
||||
"CREATE_DISTRIBUTION_SET", "READ_DISTRIBUTION_SET_TYPE",
|
||||
SpPermission.READ_DISTRIBUTION_SET + "/name==DsOne2" }, autoCreateTenant = false)
|
||||
@WithUser(authorities = { "CREATE_DISTRIBUTION_SET", SpPermission.READ_DISTRIBUTION_SET + "/name==DsOne2" }, autoCreateTenant = false)
|
||||
void failIfHasNoForbiddingScope() throws Exception {
|
||||
createDsOne("failIfHasNoForbiddingScope");
|
||||
mvc.perform(get("/rest/v1/distributionsets")).andExpect(result -> {
|
||||
|
||||
@@ -54,9 +54,7 @@ class PreAuthorizeEnabledTest extends AbstractSecurityTest {
|
||||
* Tests whether request returns distribution set if a role with scope is granted for the user
|
||||
*/
|
||||
@Test
|
||||
@WithUser(authorities = {
|
||||
"CREATE_DISTRIBUTION_SET", "READ_DISTRIBUTION_SET_TYPE",
|
||||
SpPermission.READ_DISTRIBUTION_SET + "/name==DsOne" }, autoCreateTenant = false)
|
||||
@WithUser(authorities = { "CREATE_DISTRIBUTION_SET", SpPermission.READ_DISTRIBUTION_SET + "/name==DsOne" }, autoCreateTenant = false)
|
||||
void successIfHasRoleWithScope() throws Exception {
|
||||
createDsOne("successIfHasRoleWithScope");
|
||||
mvc.perform(get("/rest/v1/distributionsets")).andExpect(result -> {
|
||||
|
||||
@@ -118,7 +118,7 @@ public final class SpPermission {
|
||||
READ_PREFIX + SOFTWARE_MODULE + IMPLY_READ + SOFTWARE_MODULE_TYPE + LINE_BREAK +
|
||||
UPDATE_PREFIX + SOFTWARE_MODULE + IMPLY_READ + SOFTWARE_MODULE_TYPE + LINE_BREAK +
|
||||
DELETE_PREFIX + SOFTWARE_MODULE + IMPLY_READ + SOFTWARE_MODULE_TYPE + LINE_BREAK +
|
||||
DOWNLOAD_REPOSITORY_ARTIFACT + IMPLY + SOFTWARE_MODULE_DOWNLOAD;
|
||||
DOWNLOAD_REPOSITORY_ARTIFACT + IMPLY + SOFTWARE_MODULE_DOWNLOAD + LINE_BREAK;
|
||||
public static final String DISTRIBUTION_SET_HIERARCHY =
|
||||
CREATE_PREFIX + DISTRIBUTION_SET + IMPLY_READ + DISTRIBUTION_SET_TYPE + LINE_BREAK +
|
||||
READ_PREFIX + DISTRIBUTION_SET + IMPLY_READ + DISTRIBUTION_SET_TYPE + LINE_BREAK +
|
||||
|
||||
@@ -88,7 +88,7 @@ to hawkBit permissions.
|
||||
- Artifacts
|
||||
- DS tags
|
||||
|
||||
- DOWNLOAD_REPOSITORY_ARTIFACT
|
||||
- SOFTWARE_MODULE_DOWNLOAD
|
||||
- Permission to download artifacts of a software module (Note: READ_REPOSITORY allows only to read the metadata).
|
||||
|
||||
- READ_TARGET_SECURITY_TOKEN
|
||||
|
||||
Reference in New Issue
Block a user