Bug 1388017 - [userinterface_public_502] Should avoid duplicate asking and not contain html syntax <strong> when removing role from self
Summary: [userinterface_public_502] Should avoid duplicate asking and not contain html...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: bpeterse
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-24 08:51 UTC by Xingxing Xia
Modified: 2017-03-08 18:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-13 15:07:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
html syntax and duplicate asking (70.33 KB, image/png)
2016-10-24 08:51 UTC, Xingxing Xia
no flags Details
Remove_admin_see_enhanced_warning (59.45 KB, image/png)
2016-10-25 07:57 UTC, Xingxing Xia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

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


Note You need to log in before you can comment on or make changes to this bug.