-
Notifications
You must be signed in to change notification settings - Fork 0
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
PMR: Create or Delete RoleBindings in create_or_update_profiles()
#36
Conversation
create_or_update_profiles()
create_or_update_profiles()
3e714d4
to
5801682
Compare
557595a
to
e8d2713
Compare
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.
Thanks @kimwnasptd ! A couple comments.
Thanks for the review @DnPlas! I went over all the comments. A small summary of open discussions:
|
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.
Thanks, @kimwnasptd !
dff9d58
to
65cabe0
Compare
e8d2713
to
65cabe0
Compare
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.
Great work!
65cabe0
to
1cf2476
Compare
Co-authored-by: Daniela Plascencia <[email protected]>
Co-authored-by: Manos Vlassis <[email protected]>
Co-authored-by: Manos Vlassis <[email protected]>
1cf2476
to
e9c058a
Compare
Resolves #11
This PR extends the
create_or_update_profiles(pmr)
function to:Changes
has_kfam_annotations()
to also ensure that the values ofrole
annotation are correct (eitheradmin
,edit
orview
)get_annotations()
helper, to reduce a bit the pain of checking constantly forNone
in metadataProfile
class, in order to have a dict for contributors with username as a key. This would help to significantly reduce the checks needed when checking if a user with a role is a Contributor defined in the Profileapply_profile_and_resources()
function, to avoid repetitionReview Notes
create_or_update.py
and then the helper functionsview
access and another one foradmin
).4. In general,
edit
is a superset ofview
andadmin
a superset ofedit
5. still the code should be able to keep this in mind when cleaning up RoleBindings
roleRef
in RoleBindings since the field is immutable, thus the need for deleting and not updating RoleBindingsLastly, I pondered a lot on the functions and whether we should have RoleBinding specific functions or generalise them. In the end, I went with separate ones as AuthorizationPolicies will need slightly different handling (PTAL in #31)