Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 831153

Summary: Repositories click on Import button leads to exceptional page when no permission is given
Product: [JBoss] JBoss Operations Network Reporter: Armine Hovsepyan <ahovsepy>
Component: ContentAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.1.0CC: hrupp, jshaughn, mfoley
Target Milestone: ---   
Target Release: JON 3.3.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 880837 (view as bug list) Environment:
Last Closed: 2014-08-25 21:08:01 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:
Embargoed:
Bug Depends On: 880837    
Bug Blocks:    
Attachments:
Description Flags
exceptional page
none
exceptions none

Description Armine Hovsepyan 2012-06-12 10:31:07 UTC
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:
always

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 10:31:49 UTC
Created attachment 591163 [details]
exceptions

Comment 2 Jay Shaughnessy 2012-06-15 20:47:34 UTC
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 07:25:10 UTC
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 15:41:44 UTC
Per triage, target 3.2

Comment 5 Jay Shaughnessy 2012-06-18 15:43:06 UTC
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 16:03:04 UTC
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 16:40:51 UTC
(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 21:08:01 UTC
I'm closing this.  If the page ever gets re-impl'd the buttons will be better.