Bug 831153 - Repositories click on Import button leads to exceptional page when no permission is given
Repositories click on Import button leads to exceptional page when no permiss...
Product: JBoss Operations Network
Classification: JBoss
Component: Content (Show other bugs)
JON 3.1.0
All All
unspecified Severity medium
: ---
: JON 3.3.0
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On: 880837
  Show dependency treegraph
Reported: 2012-06-12 06:31 EDT by Armine Hovsepyan
Modified: 2015-09-02 20:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 880837 (view as bug list)
Last Closed: 2014-08-25 17:08:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
exceptional page (121.12 KB, image/png)
2012-06-12 06:31 EDT, Armine Hovsepyan
no flags Details
exceptions (262.64 KB, image/png)
2012-06-12 06:31 EDT, Armine Hovsepyan
no flags Details

  None (edit)
Description Armine Hovsepyan 2012-06-12 06:31:07 EDT
Created attachment 591162 [details]
exceptional page

Description of problem:
For user with unchecked "Manage Repositories" permission -click on Import button leads to exceptional page

Version-Release number of selected component (if applicable):
JON - Version: 3.1.0.ER6

How reproducible:

Steps to Reproduce:

1.Log in with rhqadmin super user
2.Create role "testRole" with  Manage Repositories unchecked
3.Create "testUser" user with this role
4.Log in with "testUser"
5.Click Administration navigation tab
6.Click  Repositories sub navigation on the left hand side
7. Click Import button

Actual results:
page with exceptions is being shown

Expected results:
After step 7. "?????" Either Import button is not visible, or just no error is shown ???????

Additional info:
please get attached screenshots
Comment 1 Armine Hovsepyan 2012-06-12 06:31:49 EDT
Created attachment 591163 [details]
Comment 2 Jay Shaughnessy 2012-06-15 16:47:34 EDT
The exception page is telling the user he needs MANAGE_REPOSITORY privilege. This seems correct to me.  I think this is working as expected.
Comment 3 Armine Hovsepyan 2012-06-18 03:25:10 EDT
Could you please look into "exceptional page" attachment. It seems a little bit "ugly" to show the exception on a page.
Comment 4 Charles Crouch 2012-06-18 11:41:44 EDT
Per triage, target 3.2
Comment 5 Jay Shaughnessy 2012-06-18 11:43:06 EDT
Looking at this again. For a private repo owned by the current user perhaps import should work.  For a global repo the permission exception is acceptable for now. When the page is converted to SmartGWT then we should implement button enablement as needed.
Comment 6 Jay Shaughnessy 2012-06-18 12:03:04 EDT
OK, never mind.  Repositories->Import is used to Import a repo.  It looks at the existing content sources, lets you select one, one then import a repo offered by that content source.  This *should* require MANAGE_REPOSITORIES because that perm is required to manipulate content sources at all.

So, this is working as expected.  As mentioned above, when reimplementing this in SmartGWT the button enablement should be handled better.

Recommend close this.
Comment 7 Charles Crouch 2012-06-18 12:40:51 EDT
(11:23:55 AM) ccrouch: jshaughn: i agree this should be part of the gwt-ification of these pages. I still think its reasonable as something to consider  as part of jon32
(11:24:01 AM) ccrouch: i'll add another comment
(11:26:46 AM) jshaughn: what is reasonable?
(11:27:01 AM) ccrouch: the gwt-ification
(11:27:26 AM) jshaughn: +1 these pages should be converted
(11:27:37 AM) jshaughn: perhaps new or re-purposed bz for that
(11:27:49 AM) jshaughn: but the SLSB code seems correct to me.
(11:28:19 AM) ccrouch: so...
(11:28:19 AM) ccrouch: if/when these pages are converted we just need to make sure this particular use case works as expected, with no exception logged to the user
(11:29:00 AM) jshaughn: well, the button would be disabled.  But if you use a remote client you should get the exception

Setting this back to new. It will be addressed when the content pages are converted over to gwt.
Comment 9 Jay Shaughnessy 2014-08-25 17:08:01 EDT
I'm closing this.  If the page ever gets re-impl'd the buttons will be better.

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