Project

General

Profile

Bug #29065

Hammer filter create fails if default location is set.

Added by Tomer Brisker 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Organizations and Locations
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1792339

Description of problem:

"hammer role create" now assigns "Default Location" by default. It did not do that previously.

Attempting to create a filter for a role fails with error:

Could not create the permission filter:
Location ids You can't assign locations to this resource

How reproducible:

every time

Steps to Reproduce:
[root@dhcp-3-165 ~]# hammer role create --name test

~]# hammer filter create --permissions="view_activation_keys,create_activation_keys,edit_activation_keys,destroy_activation_keys" --role-id=32
Could not create the permission filter:
Location ids You can't assign locations to this resource
[root@dhcp-3-165 ~]# hammer role info --name test
Id: 32
Name: test
Builtin: no
Description:
Locations:
Default Location

[root@dhcp-3-165 ~]# hammer role create --name test2
User role [test2] created.
[root@dhcp-3-165 ~]# hammer role info --name test2
Id: 33
Name: test2
Builtin: no
Description:
Locations:
Default Location

Actual results:

Could not create the permission filter

Expected results:

hammer filter can be created


Related issues

Related to Foreman - Bug #28272: can't create a filter for a role with view_organizations or view_locations permissions via API/hammerResolved
Related to Foreman - Bug #29056: Hammer filter create fails if default organization is set.Closed

Associated revisions

Revision cce34197 (diff)
Added by Ondřej Pražák 4 months ago

Fixes #29065 - Do not add lone taxonomies to filter

History

#1 Updated by Tomer Brisker 5 months ago

  • Category set to Organizations and Locations
  • Subject changed from Hammer filter create fails if default location is set. to Hammer filter create fails if default location is set.

#2 Updated by Tomer Brisker 5 months ago

  • Related to Bug #28272: can't create a filter for a role with view_organizations or view_locations permissions via API/hammer added

#3 Updated by Tomer Brisker 5 months ago

  • Related to Bug #29056: Hammer filter create fails if default organization is set. added

#4 Updated by Shira Maximov 5 months ago

  • Status changed from New to Closed

The bug is no longer reproducible.

#5 Updated by Tomer Brisker 4 months ago

  • Status changed from Closed to Resolved

#6 Updated by Shira Maximov 4 months ago

  • Status changed from Resolved to New

#7 Updated by The Foreman Bot 4 months ago

  • Assignee set to Ondřej Pražák
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7493 added

#8 Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/foreman/pull/7494 added

#9 Updated by Oleh Fedorenko 4 months ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/7493)

#10 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases 2.1.0 added

#11 Updated by Ondřej Pražák 4 months ago

  • Status changed from Ready For Testing to Closed

#12 Updated by Tomer Brisker 4 months ago

  • Fixed in Releases 1.24.3, 2.0.0 added
  • Fixed in Releases deleted (2.1.0)

Also available in: Atom PDF