Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1388017 - [userinterface_public_502] Should avoid duplicate asking and not contain html syntax <strong> when removing role from self
[userinterface_public_502] Should avoid duplicate asking and not contain html...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console (Show other bugs)
3.4.0
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: bpeterse
Yadan Pei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-24 04:51 EDT by Xingxing Xia
Modified: 2017-03-08 13 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-13 10:07:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description Xingxing Xia 2016-10-24 04:51:55 EDT
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 10:37:31 EDT
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 17:16:38 EDT
PR open for this: https://github.com/openshift/origin-web-console/pull/718
Comment 3 Xingxing Xia 2016-10-25 03:42:13 EDT
(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 03:57 EDT
Created attachment 1213742 [details]
Remove_admin_see_enhanced_warning
Comment 5 Xingxing Xia 2016-10-25 03:58:15 EDT
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 17:48:51 EDT
Just for clarification, are you seeing two modals (back to back) for one action?
Comment 7 Xingxing Xia 2016-10-25 23:39:29 EDT
(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 13:58:08 EDT
This has been merged into ose and is in OSE v3.4.0.19 or newer.
Comment 10 Yadan Pei 2016-11-03 02:39:42 EDT
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.