Skip to content
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

Update membership role filter to use new annotation #1172

Merged

Conversation

benjaminapetersen
Copy link
Contributor

@benjaminapetersen
Copy link
Contributor Author

@enj fyi

! _.startsWith(item.metadata.name, 'system:') &&
! _.startsWith(item.metadata.name, 'registry-') &&
! _.startsWith(item.metadata.name, 'self-');
return !annotation(item, 'systemOnly');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to actually check the content of the annotation and compare it to the string 'true' in theory someone could set the annotation and set it to false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, & verified with @enj that is consistent with some other annotations. So only 'true' will be honored. Updated.

@jwforres
Copy link
Member

@benjaminapetersen have you run the latest origin images and made sure this works as expected in combination with that?

@benjaminapetersen
Copy link
Contributor Author

@jwforres yup, built it this morn

@jwforres
Copy link
Member

@benjaminapetersen the travis failure is because your spec tests need to be updated

@benjaminapetersen
Copy link
Contributor Author

fixed
[TEST]

// ignored
{metadata: {name: 'admin'}},
{metadata: {name: 'edit'}}
{metadata: {name: 'system-only-role', annotations: {'authorization.openshift.io/system-only': 'true'}}},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add one with the annotation set to false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah ill add a few more examples of things that wont actually pass the filter, just to be clear.

@openshift-bot
Copy link

Evaluated for origin web console test up to 4884f0c

@openshift-bot
Copy link

Origin Web Console Test Results: Running (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/971/) (Base Commit: 5d5983c)

@jwforres
Copy link
Member

[merge]

@openshift-bot
Copy link

Evaluated for origin web console merge up to 4884f0c

@openshift-bot
Copy link

openshift-bot commented Jan 23, 2017

Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/972/) (Base Commit: 5d5983c)

@openshift-bot openshift-bot merged commit e3d3db7 into openshift:master Jan 23, 2017
@benjaminapetersen benjaminapetersen deleted the role-filter-update branch January 24, 2017 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants