Bug 1388017

Summary: [userinterface_public_502] Should avoid duplicate asking and not contain html syntax <strong> when removing role from self
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: Management ConsoleAssignee: bpeterse
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.4.0CC: aos-bugs, jforrest, jokerman, mmccomas, spadgett, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-13 15:07:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
html syntax and duplicate asking
none
Remove_admin_see_enhanced_warning none

Description Xingxing Xia 2016-10-24 08:51:55 UTC
Created attachment 1213379 [details]
html syntax and duplicate asking

Description of problem:
Should avoid duplicate asking and not contain html syntax <strong> when removing role from self

Version-Release number of selected component (if applicable):
v3.4.0.14

How reproducible:
Always

Steps to Reproduce:
1. Login with admin user
2. Go to "Resources" -> "Membership", click "Edit Membership"
3. Add any role, e.g. view, to yourself
4. Click "X" near one role to remove it from yourself

Actual results:
4. As attachment, the pop-up warning contains html syntax <strong>, and the two "Are you sure" questions look like duplicate meaning:
Are you sure you want to remove <strong>view</strong> from <strong>xxia</strong> (you)?

Are you sure you want to remove view from the user xxia?

Expected results:
4. Should avoid duplicate asking (e.g. the second one) and not contain html syntax <strong> when removing role from self. E.g. the warning could look like (role name and user are bold):
Are you sure you want to remove view from the user xxia(you)?

Additional info:

Comment 1 bpeterse 2016-10-24 14:37:31 UTC
We always ask for a destructive action, so the modal exists for every "delete".

The HTML syntax is probably a duplicate of this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1388043. I'll address this shortly.

Comment 2 bpeterse 2016-10-24 21:16:38 UTC
PR open for this: https://github.com/openshift/origin-web-console/pull/718

Comment 3 Xingxing Xia 2016-10-25 07:42:13 UTC
(In reply to bpeterse from comment #1)
> We always ask for a destructive action, so the modal exists for every
> "delete".

I agree at the modal "Are you sure you want to remove <strong>view</strong> from <strong>xxia</strong> (you)?" for the destruction.
But now that this modal exists, the second modal withou 'you' - "Are you sure you want to remove view from the user xxia" looks redundant.
So for destructive action, it is better to merge the two asking into one, as suggested in step 4: "Are you sure you want to remove view from the user xxia(you)?". This looks succincter.

Comment 4 Xingxing Xia 2016-10-25 07:57:38 UTC
Created attachment 1213742 [details]
Remove_admin_see_enhanced_warning

Comment 5 Xingxing Xia 2016-10-25 07:58:15 UTC
New issue when removing "admin" from self:
If you (the current login user) have only one role "admin", removing "admin" will show enhanced warning:
  Removing the role "admin" may completely remove your ability to see this project. (See the new attachment "Remove_admin_see_enhanced_warning")

But if you have other role besides "admin", removing "admin" won't show that enhanced warning, as the comment 0 attachment.

Should the expected result be: no matter whether you have other role or not, removing "admin" should always show the enhanced warning? Would this be addressed?

Comment 6 bpeterse 2016-10-25 21:48:51 UTC
Just for clarification, are you seeing two modals (back to back) for one action?

Comment 7 Xingxing Xia 2016-10-26 03:39:29 UTC
(Sorry, I understood 'modal' as 'confirmation question sentence')
Not see two modals. In comment 3, I intended to mean 'asking' instead of 'modal'. I wanted to say: now that this _asking_ exists, the second _asking_ withou 'you' - "Are you sure you want to remove view from the user xxia" looks redundant.

Comment 8 Troy Dawson 2016-11-02 17:58:08 UTC
This has been merged into ose and is in OSE v3.4.0.19 or newer.

Comment 10 Yadan Pei 2016-11-03 06:39:42 UTC
Checked against v3.4.0.19+346a31d


1. Login with user1, create a project-> Resources -> Membership -> Edit Membership
2. Add 'view' role to yourself

Remove one role when there are more than one role 
3. Remove "view" role from "user1", will give error: Are you sure you want to remove view from user1 (you)?, click cancel
4. Remove "admin" role from "user1", will give error: Are you sure you want to remove admin from user1 (you)?

When the only role is admin, trying to remove "admin" role from yourself will give error:
Are you sure you want to remove admin from yapei (you)?
Removing the role "admin" may completely remove your ability to see this project


Move to verified