New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UpdateTeam permission support #2994
Conversation
Schema Change Detected. Needs ingestion-core version bump Please run |
@@ -29,8 +29,8 @@ | |||
import org.junit.jupiter.api.Test; | |||
import org.openmetadata.catalog.entity.teams.Team; | |||
|
|||
@Slf4j | |||
/** This test provides examples of how to use applyPatch */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was being flagged as a dangling comment by the IDE
@@ -92,6 +92,7 @@ void get_permissions(String username, Map<MetadataOperation, Boolean> expectedOp | |||
put(MetadataOperation.UpdateOwner, Boolean.TRUE); | |||
put(MetadataOperation.UpdateTags, Boolean.TRUE); | |||
put(MetadataOperation.DecryptTokens, Boolean.TRUE); | |||
put(MetadataOperation.UpdateTeam, Boolean.TRUE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Admin has access to UpdateTeam
3051ca8
to
4c15ef5
Compare
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
be834fa
to
9a17192
Compare
9a17192
to
f234296
Compare
[open-metadata-ingestion] Kudos, SonarCloud Quality Gate passed! |
[catalog] Kudos, SonarCloud Quality Gate passed! |
@@ -179,6 +179,11 @@ public static EntityReference withHref(UriInfo uriInfo, EntityReference ref) { | |||
return ref.withHref(href); | |||
} | |||
|
|||
public static boolean shouldHaveOwner(@NonNull String entityType) { | |||
// Team does not have an owner. (yet?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to introduce this someday...
Team owner => manager of the team
catalog-rest-service/src/main/java/org/openmetadata/catalog/security/SecurityUtil.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM
Describe your changes :
See #2950
This supports creation of a role and adding UpdateTeam permission to the role.
Any user that has this role can update team composition of users
Type of change :
Frontend Preview (Screenshots) :
For frontend related change, please link screenshots of your changes preview! Optional for backend related changes.
Checklist:
Reviewers
Backend: @sureshms @harshach