Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1112234 - roles: publishing a CV via normal user raises NetworkError: 403 Forbidden - /foreman_tasks/api/tasks/bulk_search" bulk_search
roles: publishing a CV via normal user raises NetworkError: 403 Forbidden - ...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Users & Roles (Show other bugs)
6.0.3
Unspecified Unspecified
high Severity medium (vote)
: Unspecified
: Unused
Assigned To: Ivan Necas
Jan Hutař
http://projects.theforeman.org/issues...
: Triaged
: 1221242 (view as bug list)
Depends On:
Blocks: sam20-tracker
  Show dependency treegraph
 
Reported: 2014-06-23 07:44 EDT by Sachin Ghai
Modified: 2017-02-23 16:14 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 01:09:46 EDT
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)
NetworkError: 403 Forbidden - when publishing cv via normal user (90.80 KB, image/png)
2014-06-23 07:44 EDT, Sachin Ghai
no flags Details
version_created on navigating away from version tab (47.99 KB, image/png)
2014-06-23 07:48 EDT, Sachin Ghai
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Sachin Ghai 2014-06-23 07:44:55 EDT
Created attachment 911404 [details]
NetworkError: 403 Forbidden - when publishing cv via normal user

Description of problem:
I was trying a scenario where a normal user can publish a CV in a selected org. But when I tried publish, Firebug raises:

"NetworkError: 403 Forbidden - https://dhcp201-161.englab.pnq.redhat.com/foreman_tasks/api/tasks/bulk_search"
bulk_search


production.log says:
Processing by ForemanTasks::Api::TasksController#bulk_search as JSON
  Parameters: {"searches"=>[{"type"=>"task", "task_id"=>"b2b834f7-4288-4e8a-90dd-16eee2183e3d", "search_id"=>"1"}], "task"=>{}}
  Rendered api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout (0.7ms)
Filter chain halted as :authorize rendered or redirected
Completed 403 Forbidden in 16ms (Views: 1.7ms | ActiveRecord: 2.6ms)
Processing by ForemanTasks::Api::TasksController#bulk_search as JSON
  Parameters: {"searches"=>[{"type"=>"task", "task_id"=>"b2b834f7-4288-4e8a-90dd-16eee2183e3d", "search_id"=>"1"}], "task"=>{}}
  Rendered api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout (0.7ms)
Filter chain halted as :authorize rendered or redirected
Completed 403 Forbidden in 17ms (Views: 1.8ms | ActiveRecord: 2.8ms)

Version-Release number of selected component (if applicable):
sat6 beta snap10

How reproducible:
always 

Steps to Reproduce:
1. created a role "role1" via admin user
2. added following permissions to "role1"
   content-view resource type - create, view and publish CV
   Product resource type - view product
   activation-key resource type - create, update, destroy, view
   Lifecycle env resource type - view
3. created a  CV "cv1" via admin and addded a repo to it and published its version1
4. created a user ak1 and assign role1 to this user
5. logout with admin and login with ak1
6. selected 'cv1'
7. started publish

Actual results:
"NetworkError: 403 Forbidden - https://dhcp201-161.englab.pnq.redhat.com/foreman_tasks/api/tasks/bulk_search"
bulk_search

Expected results:
cv should be published. Not sure what I'm missing here. any permission ? If I'm missing any permission then Publish shouldn't be enabled.

Additional info:
Comment 1 Sachin Ghai 2014-06-23 07:47:53 EDT
On navigating away from version tab and come back.. version was created. Please see the screenshot.
Comment 2 Sachin Ghai 2014-06-23 07:48:57 EDT
Created attachment 911405 [details]
version_created on navigating away from version tab
Comment 5 Sachin Ghai 2014-06-24 03:48:58 EDT
I added a resource type: (Miscellaneous) with "View_tasks" permission.but no luck.
Comment 6 Walden Raines 2014-06-24 08:20:26 EDT
The publish/promotion should still be successful, it's just the querying of the task status that is not.

Downstream issue:  http://projects.theforeman.org/issues/4450
Comment 7 Walden Raines 2014-06-24 08:21:58 EDT
Connecting redmine issue http://projects.theforeman.org/issues/4450D from this bug
Comment 8 Walden Raines 2014-06-24 08:22:09 EDT
Connecting redmine issue http://projects.theforeman.org/issues/4450 from this bug
Comment 9 Tom McKay 2014-09-04 10:48:53 EDT
Also manifest upload/refresh/delete has same problem
Comment 10 Ivan Necas 2015-01-19 05:15:49 EST
Fixed as part of https://github.com/theforeman/foreman/pull/2060
Comment 14 Ivan Necas 2015-05-18 04:31:18 EDT
*** Bug 1221242 has been marked as a duplicate of this bug. ***
Comment 15 Bryan Kearney 2015-08-11 09:20:48 EDT
This bug is slated to be released with Satellite 6.1.
Comment 16 errata-xmlrpc 2015-08-12 01:09:46 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592

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