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

Should only see actions for service cat resources in overview that the user can do #1768

Merged
merged 1 commit into from
Jun 26, 2017

Conversation

jwforres
Copy link
Member

@jwforres jwforres commented Jun 26, 2017

Fixes #1751

@jwforres
Copy link
Member Author

Long term these are the ACL checks we want, in the short term these wont actually matter because we need to disable viewer access to instances/bindings, see #1769 related to that

Copy link
Contributor

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

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

Pulled the branch & tested, the logic seems good. Just the one comment otherwise LGTM.

@@ -150,6 +151,8 @@

row.canIDoAny = function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

So the purpose of this function seems to be "if I can do anything at all, show the dropdown". Its fairly lengthy, and a lot of the logic is repeated in the template with all the ng-if statements. I'm wondering if there is a way to break it down?

I pause at the switch with nested if that have //comments that are needed to reveal the true intention. I wonder if the details of this could be broken up into smaller functions and/or pushed up into the related Pod, & Deployment services (ex:DeploymentService.canIDoAny()).

Copy link
Member Author

Choose a reason for hiding this comment

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

Not new, I'm just adding to the existing behavior. If we want to come up with some alternative we'll have to do it later, its too late to make a significant change here.

And no pushing this up to DeploymentService.canIDoAny would not be right, this is specific to the actions that we choose to show on the overview.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good, yeah I'm not sure either, just thinking out loud.

@jwforres
Copy link
Member Author

[merge]

@openshift-bot
Copy link

Evaluated for origin web console merge up to 7c8a1a2

@openshift-bot
Copy link

openshift-bot commented Jun 26, 2017

Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/1599/) (Base Commit: b14785b) (PR Branch Commit: 7c8a1a2)

@openshift-bot openshift-bot merged commit 26d468a into openshift:master Jun 26, 2017
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