| Summary: | It's better to disable "Add to project" button if the user only has view permission for one project | ||
|---|---|---|---|
| Product: | OKD | Reporter: | Wei Sun <wsun> |
| Component: | Management Console | Assignee: | Jakub Hadvig <jhadvig> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Yadan Pei <yapei> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | aos-bugs, jhadvig, mmccomas, spadgett, xiaocwan |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-09-19 13:54:42 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: | |
|
Description
Wei Sun
2015-12-23 05:43:27 UTC
General story for this is in trello https://trello.com/c/UQEUgVrY This should be fixed by merged PR Still reproduced on latest origin rhel7_4552 oc v1.3.0-alpha.2-1074-g69bd399 kubernetes v1.3.0-alpha.3-599-g2746284 I've couldn't reproduce this issue. Please could you provide info on the steps you followed and what was the outcome ? Also we are not disabling the 'Add to project' button, we are hiding it. I still reproduced on today's ami devenv-rhel7_4552 Here comes my reproduced step http://pastebin.test.redhat.com/392210 Here are 2 "Add to Project" buttons and now one of them is hidden which is on top of the screen , but still show the other one in the middle of page, please see the screenshot from attachment. Thanks. Commit pushed to master at https://github.com/openshift/origin-web-console https://github.com/openshift/origin-web-console/commit/0090e0da6f622ca6ce216bc819bcdaeafe309ea1 Bug 1293791 - Hide 'Add to project' button on overview if user cant create any resource Tested on latest ami(devenv-rhel7_4607).
git log contains: commit 0090e0da6f622ca6ce216bc819bcdaeafe309ea1
Author: jhadvig <jhadvig>
Date: Thu Jul 14 11:36:56 2016 +0200
Bug 1293791 - Hide 'Add to project' button on overview if user cant create any resource
Still find button:
<a href="project/xiaocwan-t/create" ng-href="project/xiaocwan-t/create" class="btn btn-lg btn-primary">
Add to Project
</a>
There are Two add-to-project in original bug. The button on top of page is hidden but the other one in middle of page is still here since https://bugzilla.redhat.com/show_bug.cgi?id=1293791#c7 , please refer to the screenshot from attachment "Add-to-Project_button".
Thanks!
Steps to reproduce: 1. User1 create a project 2. User1 grand view role to user2: $oc policy add-role-to-user view user2 -n <user1-project> 3. User2 login, go to the project and check page on web console Verified on latest origin oc v1.3.0-alpha.2+6bfd721-dirty openshift v1.3.0-alpha.2+6bfd721-dirty kubernetes v1.3.0+57fb9ac No "Add-to-Project" to show, used following message instead: Welcome to project xiaocwan-t. If you need to create resources in this project, a project administrator can grant you additional access by running this command: oc policy add-role-to-user <role> xiaoviewer -n xiaocwan-t |