Bug 1388060 - [userinterface_public_502] Web should not add user to rolebinding again if the user is already in it
Summary: [userinterface_public_502] Web should not add user to rolebinding again if th...
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 10:45 UTC by Xingxing Xia
Modified: 2017-02-23 09:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1426118 (view as bug list)
Environment:
Last Closed: 2016-12-13 15:28:00 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Xingxing Xia 2016-10-24 10:45:52 UTC
Description of problem:
Web should not add user to rolebinding again if the user is already in it

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

How reproducible:
Always

Steps to Reproduce:
1. Login to web console, create project
2. Go to "Resources" -> "Membership", click "Edit Membership"
3.
1> Add role to user: input user name "bob", select "view", click "Add"
2> Then check rolebinding in CLI:
$ oc get rolebinding view

4. Do step 3 again.

Actual results:
3.
2> It shows:
view                    /view                      bob

4. 
2> It adds bob twice and shows:
view                    /view                      bob, bob

Expected results:
4.
2> Should not add bob again into the rolebinding. Because:
A. If step 4 is done via CLI `oc policy add-role-to-user view bob`, bob is not added again.
B. https://github.com/openshift/origin-web-console/pull/562#issue-178108708 says it: "On add, check for duplicates,do not add a user/group/etc to a rolebinding if already present in the specified rolebinding"

Additional info:

Comment 1 bpeterse 2016-11-01 20:36:09 UTC
PR open for this https://github.com/openshift/origin-web-console/pull/788

Comment 2 Jessica Forrester 2016-11-08 14:44:56 UTC
This was fixed

Comment 3 Xingxing Xia 2016-11-09 02:26:35 UTC
Verified in openshift v3.4.0.23+24b1a58. Now duplicate adding is checked and will prompt message: the role is already granted to user.
I'd like to move to VERIFIED (skip the ON_QA status)
Thank you :)


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