Bug 966035 - CLI - user cannot promote content view
CLI - user cannot promote content view
Status: CLOSED NOTABUG
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
Nightly
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Justin Sherrill
Garik Khachikyan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-22 06:27 EDT by Ales Dujicek
Modified: 2015-01-04 16:59 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-24 10:38:31 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)

  None (edit)
Description Ales Dujicek 2013-05-22 06:27:50 EDT
Description of problem:

User with content_views promote permission is not allowed to promote content views.


Version-Release number of selected component (if applicable):
katello-certs-tools-1.4.2-1.el6.noarch
katello-glue-pulp-1.4.2-1.git.423.1f4d874.el6.noarch
katello-glue-elasticsearch-1.4.2-1.git.423.1f4d874.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-repos-1.4.2-1.el6.noarch
katello-selinux-1.4.3-1.git.3.ce8227b.el6.noarch
katello-all-1.4.2-1.git.423.1f4d874.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-1.4.2-1.git.63.00cba8e.el6.noarch
signo-katello-0.0.9-1.el6.noarch
katello-glue-candlepin-1.4.2-1.git.423.1f4d874.el6.noarch
katello-configure-1.4.3-1.git.39.23db912.el6.noarch
katello-common-1.4.2-1.git.423.1f4d874.el6.noarch
katello-cli-common-1.4.2-1.git.63.00cba8e.el6.noarch
katello-1.4.2-1.git.423.1f4d874.el6.noarch


How reproducible:
always

Steps to Reproduce:
1. prepare org, env, content view, user and role with promote permission
org create --name org
environment create --name Dev --org org --prior Library
content definition create --name tdef --org org
content definition publish --name tdef --org org --view_name tview
user create --username tuser --email root@localhost --password testing
user_role create --name trole
permission create --name tpermc --org org --scope content_views --verbs "promote,read" --user_role trole --tags tview
permission create --name tpermo --org org --scope organizations --verbs read --user_role trole
user assign_role --username tuser --role trole
2. promote content view
content view promote --org org --environment Dev --name tview

Actual results:
error is shown: User tuser is not allowed to access api/v1/content_views/promote

Expected results:
should promote content view
Comment 2 Justin Sherrill 2013-05-24 09:44:42 EDT
So I don't believe this is actually a bug, you're just missing a permission.

permission create --name tpermo --org org --scope environments --verbs promote_changesets --user_role trole


In order to actually promote a changeset, you need the 'promote_changesets' permission within the environment.  The Content view 'promote' verb, really just means add to a changeset, so it might be misnamed. 

Can you confirm that this helps  ^
Comment 3 Garik Khachikyan 2013-05-24 10:02:26 EDT
thanks Justin for investigation.

/me looking now on it. will reply. thanks.
Comment 4 Garik Khachikyan 2013-05-24 10:38:31 EDT
@Justin: confirm.

I added `permission create --name permEnvs --scope environments --verbs promote_changesets --all_tags --user_role <role> --org <org>` an then it just works!

thanks - closing it (if you don't mind) ;)

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