-
Notifications
You must be signed in to change notification settings - Fork 230
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
Conversation
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 |
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.
Pulled the branch & tested, the logic seems good. Just the one comment otherwise LGTM.
@@ -150,6 +151,8 @@ | |||
|
|||
row.canIDoAny = function() { |
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.
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()
).
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.
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.
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.
Sounds good, yeah I'm not sure either, just thinking out loud.
[merge] |
Evaluated for origin web console merge up to 7c8a1a2 |
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) |
Fixes #1751