Skip to content

Commit

Permalink
Add connection management permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
rmstar committed Dec 1, 2023
1 parent 10334a2 commit 3063f27
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,7 @@ public enum RolePermission {
// Source Control Management
@JsonProperty("Manage Source Control")
MANAGE_SCM,

@JsonProperty("Manage Connections")
MANAGE_SYSTEM_APP_ENTITIES
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public static List<EntityTypeWithPermission> convertToEntityTypeWithPermission(R
new EntityTypeWithPermission(EntityType.APPLICATION, StandardPermission.CREATE),
new EntityTypeWithPermission(EntityType.DATASET, StandardPermission.CREATE),
new EntityTypeWithPermission(EntityType.APPLICATION, StandardPermission.GET),
new EntityTypeWithPermission(EntityType.ARTIFACT, StandardPermission.GET)
new EntityTypeWithPermission(EntityType.ARTIFACT, StandardPermission.GET),
new EntityTypeWithPermission(EntityType.SYSTEM_APP_ENTITY, StandardPermission.CREATE),
new EntityTypeWithPermission(EntityType.SYSTEM_APP_ENTITY, StandardPermission.USE)
);
case DELETE_PIPELINE:
return Arrays.asList(
Expand Down Expand Up @@ -157,7 +159,8 @@ public static List<EntityTypeWithPermission> convertToEntityTypeWithPermission(R
case USE_WRANGLER:
return Arrays.asList(
new EntityTypeWithPermission(EntityType.APPLICATION, StandardPermission.GET, true),
new EntityTypeWithPermission(EntityType.DATASET, StandardPermission.LIST, true)
new EntityTypeWithPermission(EntityType.DATASET, StandardPermission.LIST, true),
new EntityTypeWithPermission(EntityType.SYSTEM_APP_ENTITY, StandardPermission.USE)
);
case MANAGE_SECURE_KEY:
return Arrays.asList(
Expand All @@ -172,6 +175,12 @@ public static List<EntityTypeWithPermission> convertToEntityTypeWithPermission(R
new EntityTypeWithPermission(EntityType.NAMESPACE, NamespacePermission.WRITE_REPOSITORY),
new EntityTypeWithPermission(EntityType.NAMESPACE, NamespacePermission.UPDATE_REPOSITORY_METADATA)
);
case MANAGE_SYSTEM_APP_ENTITIES:
return Arrays.asList(
new EntityTypeWithPermission(EntityType.SYSTEM_APP_ENTITY, StandardPermission.CREATE),
new EntityTypeWithPermission(EntityType.SYSTEM_APP_ENTITY, StandardPermission.UPDATE),
new EntityTypeWithPermission(EntityType.SYSTEM_APP_ENTITY, StandardPermission.DELETE)
);
}

Permission cdapPermission = getPermission(permission);
Expand Down

0 comments on commit 3063f27

Please sign in to comment.