Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1221343 - validate permission name should be unique and not scoped by resource_type
Summary: validate permission name should be unique and not scoped by resource_type
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: jmagen@redhat.com
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: rhci-common-installer
TreeView+ depends on / blocked
 
Reported: 2015-05-13 19:14 UTC by Bryan Kearney
Modified: 2017-02-23 20:03 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 13:58:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 10492 0 Normal Closed validate permission name should be unique and not scoped by resource_type 2020-07-28 10:48:35 UTC

Description Bryan Kearney 2015-05-13 19:14:01 UTC

Comment 1 Bryan Kearney 2015-05-13 19:14:02 UTC
Created from redmine issue http://projects.theforeman.org/issues/10492

Comment 2 Bryan Kearney 2015-05-13 19:14:04 UTC
Upstream bug assigned to jmagen

Comment 3 Bryan Kearney 2015-05-15 17:55:27 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/10492 has been closed
-------------
Joseph Magen
Applied in changeset commit:04ad52f78f83954bec062a48a0ee3cd7d35bb9dd.

Comment 4 Daniel Lobato Garcia 2015-05-18 17:10:53 UTC
Merged as 9163edbb1bc6cb6e0f398d52fb48c3fd4bce346b

Comment 6 Tazim Kolhar 2015-05-22 05:18:46 UTC
hi

please provide verification steps

thanks

Comment 7 jmagen@redhat.com 2015-05-28 12:35:22 UTC
Code in Fusor/RHCI was fixed so it doesn't use same permission name as foreman_discovery gem

Comment 8 jmagen@redhat.com 2015-05-31 08:05:32 UTC
This commit was merged into Foreman on May 14th

fixes #10492 - permission name should be unique and not scoped by resource_type
https://github.com/theforeman/foreman/commit/04ad52f78f83954bec062a48a0ee3cd7d35bb9dd

and duplicate permission name was changed in Fusor

Changing name of permission for :destroy_discovered_hosts, since it conflicts with permission created by foreman-discovery
https://github.com/fusor/fusor/commit/53c67268345bf2afe90f86a1e7a564ce037891ba

so I think this bug can be closed.

Comment 9 Sachin Ghai 2015-06-02 05:26:23 UTC
Please provide steps to verify this bz. Thanks

Comment 10 jmagen@redhat.com 2015-06-04 07:39:17 UTC
Sachin,
Verification are the 2 commit were merged. One in Foreman and one in Fusor.
Permission name in fusor plugin is hard-coded and not dependant on any user input. The fact that the plugin loads with no errors is verification that bug is fixed.

Comment 11 Sachin Ghai 2015-06-05 12:59:00 UTC
Verified in sat6.1 GA snap7 based on the changes in comment8.

The uniqueness of permission is set to true and now not scoped by resource-type.

[root@cloud-qe-14 ~]# find / -name permission.rb
/usr/share/foreman/app/models/permission.rb
[root@cloud-qe-14 ~]# cat /usr/share/foreman/app/models/permission.rb
class Permission < ActiveRecord::Base
  attr_accessible :name, :resource_type

  validates_lengths_from_database
  validates :name, :presence => true, :uniqueness => true

Comment 12 Bryan Kearney 2015-08-11 13:33:23 UTC
This bug is slated to be released with Satellite 6.1.

Comment 13 Bryan Kearney 2015-08-12 13:58:47 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.


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