Project

General

Profile

Actions

Bug #35951

closed

Show proper error on sync when user does not have “view_capsule_content” permission?

Added by Samir Jha over 2 years ago. Updated over 1 year ago.

Status:
Duplicate
Priority:
Normal
Assignee:
Category:
Foreman Proxy Content
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Currently if the user starting a repo sync does not have sync_capsule_content permission, the following errors are reported on the triggered capsule syncs. The error is valid but not descriptive and doesn't point to the actionable root cause of missing permissions.
Couldn’t find SmartProxy with ‘id’=1 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=2 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=3 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=4 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=5 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=6 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=7 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=8 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=9 [WHERE (1=0)]
Couldn’t find SmartProxy with ‘id’=10 [WHERE (1=0)]

https://github.com/Katello/katello/blame/17ce3e44cf8ea6fdde6c6f4ca636bcec319bb41d/app/lib/actions/katello/capsule_content/sync.rb#L51 will need to be updated to properly handle the permissions.

Actions

Also available in: Atom PDF