Repository navigation
Project Membership - #562
benjaminapetersen wants to merge 1 commit into
Conversation
|
A few thoughts:
|
|
The |
|
Great, thx for the feedback! I prob should have said its still in prototype/ugly mode, but great feedback nonetheless. 😄 |
|
Answer on the api for addrolebindingrequest seems to be "not anytime soon". |
|
Design Review feedback:
MAYBE:
API needs: (@enj)
FUTURE:
CONSIDERATIONS:
|
|
Interesting, if we had the number of groups (SAs, etc) that have access in On Fri, Sep 30, 2016 at 2:08 PM, Ben Petersen [email protected]
|
19813af to
121ac18
Compare
|
Progress update, getting closer to polish time. Are you sure you want to wreck yo' self modal: Nah, but I'd like to wreck the system by messing up my service accounts modal: @jwforres and any who would like to chime in, feel free to lay on the feedback!
|
|
|
I'd add the kind to the names in the dialog. We usually lower-case the kind in sentences.
Looking polished :) |
|
|
Good thoughts!
|
|
Does the role get added when you click "add" or when you click "done"?
|
If you delete all roles from a user while editing, does their row go away or does it remain with "None" in the roles column until you click Done" |
|
|
We may show again in the design review tomorrow if time permits. |
|
@liggitt buttons for reference: |
|
@mo @liggitt @smarterclayton @deads2k @jwforres @spadgett for feedback on annotations:
|
|
|
I think "Membership" should go above "Other Resources." Is "Project Membership" too long? Would be more obvious what it is. Note @jhadvig is adding a "Secrets" menu item above "Other Resources." |
|
Add the |
|
Maybe have a help block under "Users" and "Groups" as well so they're consistent and the content doesn't appear to jump when switching tabs? |
|
@rhamilto Is adding a badge style for add to project category counts. I wonder how that would look in the tab headings here. (Definitely can be a follow on if we decide to change it.) |
c5a80cc to
cd389ea
Compare
|
I don't like making them hover in order to see it's a locally defined role |
|
On Thu, Oct 20, 2016 at 11:55 AM, Ben Petersen [email protected]
|
We should say why or maybe say that you don't normally need to use them. |
|
@rhamilto got it, is now "#4d5258" as elsewhere (action-inline) And help text is now "System roles are hidden by default and do not typically need to be managed." |
| "custom_strategy": "https://docs.openshift.org/latest/dev_guide/deployments.html#custom-strategy", | ||
| "lifecycle_hooks": "https://docs.openshift.org/latest/dev_guide/deployments.html#lifecycle-hooks", | ||
| "new_pod_exec": "https://docs.openshift.org/latest/dev_guide/deployments.html#pod-based-lifecycle-hook", | ||
| "authorization": "https://docs.openshift.org/latest/architecture/additional_concepts/authorization.html", |
| }, | ||
| remove: { | ||
| areYouSure: { | ||
| subject: _.template('Are you sure you want to remove <strong><%= roleName %></strong> from the <%= kindName %> <strong><%= subjectName %></strong>?'), |
There was a problem hiding this comment.
@benjaminapetersen You can use the HTML escape delimiter here. That needs to be used anywhere we use the result as HTML.
_.template('Are you sure you want to remove <strong><%- roleName %></strong> from the <%- kindName %> <strong><%- subjectName %></strong>?')| subjectKindsForUI: MembershipService.mapRolebindingsForUI(resp.by('metadata.name'), allRoles) | ||
| }); | ||
| }, { | ||
| // errorNotification: false TODO: DataService.list() does not support |
There was a problem hiding this comment.
errorNotification: false TODO: DataService.list() does not support
It supports it now. I added it recently.
| var selectedTab = {}; | ||
| if($routeParams.tab) { | ||
| selectedTab[$routeParams.tab] = true; // ex: tab=Group for Groups, pluralized in the template | ||
| } |
There was a problem hiding this comment.
already got it!
| var noAdditional = 'There is no additional information about this role.'; | ||
| var prefix = role.kind + ': '; | ||
| return role ? | ||
| prefix + (annotation(role, 'description') || noAdditional) : |
There was a problem hiding this comment.
Should probably use the description filter here.
| class="pull-right btn btn-default" | ||
| ng-disabled="disableAddForm" | ||
| ng-click="toggleEditMode()">Done Editing</a> | ||
| Permissions |
There was a problem hiding this comment.
I think I preferred "Membership".
There was a problem hiding this comment.
Agree, rolling back
| ng-show="!(mode.edit)" | ||
| ng-click="toggleEditMode()"> | ||
| Edit Membership | ||
| </a> |
There was a problem hiding this comment.
Could have just one a element and change the text based on mode.edit
There was a problem hiding this comment.
good call
| ng-click="toggleEditMode()">Done Editing</a> | ||
| Permissions | ||
| </h1> | ||
| <small class="meta"> |
There was a problem hiding this comment.
<span class="learn-more-block">?
| ng-if="subjectKind.helpLinkKey" | ||
| target="_blank" | ||
| ng-href="{{subjectKind.helpLinkKey | helpLink}}" | ||
| class="meta"> |
| <div class="modal-resource-action"> | ||
| <div class="modal-body"> | ||
| <h1>{{message}}</h1> | ||
| <p ng-if="details" ng-bind-html="details"></p> |
There was a problem hiding this comment.
There is existing code that uses this dialog which might not be passing HTML sanitized values in details. This really need to be a separate property like detailsMarkup or something that makes it clear markup is expected.
There was a problem hiding this comment.
Fixing now
Looking at this. The |
e30df6e to
a2a5152
Compare
spadgett
left a comment
There was a problem hiding this comment.
Approving these changes.
@benjaminapetersen Please open an issue to track the follow on work for MembershipService.
- Manage bindings for all 5 subject kinds via tabs - user, group, serviceaccount, systemuser - Add membership service - get business logic out of membership controller - Add roles service - handle roles & clusterRoles - Add roleBindings service - Add action-chip directive - very similar to labels "tags" - Add membership to menu in constants.js - Add help links for roles/roleBindings - Support detailHTML in confirmModal
a2a5152 to
43bfc7a
Compare
|
[merge] |
|
Evaluated for origin web console merge up to 43bfc7a |
|
Origin Web Console Merge Results: FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/548/) (Base Commit: 798e6f8) |
|
Hmm. Not sure, dist is built: Double slash in that path |
|
So: But locally running |
|
Evaluated for origin web console test up to 43bfc7a |
|
Origin Web Console Test Results: FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/550/) (Base Commit: 798e6f8) |
|
Changes merged in #698 |
















@ajacobs21e @jwforres @spadgett @enj
Tasks:
rolebindingsfor the same role is removed from bothrolebindings.rolebindingsfor the same role, only add to one of therolebindings.rolebindingif already present in the specifiedrolebindingrolebinding, delete therolebindingend-usertype of annotation to show/hide roles (for above checkbox task)descriptionannotation if presentPotential additional tasks (nice to have if they make sense):
Show/hide the membership menu item based on the user's ability to manage rolebindings?FutureFor non-admin users, it may be nice to show a list of "what can I do" for the project, since they will not be able to see theFuture perhapsrolebindings, and showing themlocal roles&clusterrolesthat they cannot interact with is not helpfulOn add, if user/group/etc is already a part of another role, can offer to update that role if it is sensible (ie, if inNot currently a "weight" or ranking available via api for rolesviewand is added toadmin, is not necessary for.create a new group, add users to group, assign group to a role?nope. cluster admin onlyPrototype UI screenshots:
First view hides many of the roles to keep the picker sane:


Second view shows everything, it is reasonable someone will want to interact with these at some point: