Project

General

Profile

Bug #18913

Block ability to disable orgs and locations in the installer

Added by Daniel Lobato Garcia over 2 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1186065
Description of problem:

Disable locations and organization from the gui, change the parameter for locations in /usr/share/foreman/config/settings.yaml to false and works as expected the location is take out from the gui but when try also the organization i got the following error and i can't login to the gui

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

How reproducible:
edit /usr/share/foreman/config/settings.yaml and put organizations to false
:locations_enabled: true
:organizations_enabled: false

and you can get the error in the actual results, instead with location works fine no error at all

:locations_enabled: false
:organizations_enabled: false

Steps to Reproduce:
1.edit the settings.yaml
2.replace :organizations_enabled: false
3.restart katello-service

Actual results:
undefined method `actions' for nil:NilClass (NoMethodError)
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/lib/katello/permissions/organization_permissions.rb:3:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/lib/katello/permissions.rb:2:in `block in <top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/lib/katello/permissions.rb:1:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/lib/katello/permissions.rb:1:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/lib/katello/engine.rb:138:in `block in <class:Engine>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
config.ru:3:in `block in <main>'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in `eval'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in `preload_app'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in `<main>'

Expected results:
Take out organization tab from the gui

Additional info:

History

#1 Updated by Justin Sherrill over 2 years ago

  • Category set to Organizations and Locations
  • Status changed from New to Rejected
  • Legacy Backlogs Release (now unused) set to 166

Katello requires organizations in order to run, and cannot currently in any way run without organiations. Rejecting this request for now

#2 Updated by Marek Hulán over 2 years ago

Justin, I think the requirement is actually about disabling these options from installer so people can not disable orgs and locs. At least that was discussed in the BZ. Could we reopen (I'm happy to change the subject so it makes more sense)

#3 Updated by Justin Sherrill about 2 years ago

  • Subject changed from Disable locations and organization from the gui is not working also from katello-installer is crash to Block ability to disable orgs and locations in the installer
  • Status changed from Rejected to New
  • Legacy Backlogs Release (now unused) deleted (166)

Reopened and title updated. One thing to keep in mind that a user recently opened an upstream PR to fix an issue with disabled locations, so we may want to test and see if it works (it may).

#4 Updated by Justin Sherrill almost 2 years ago

  • Legacy Backlogs Release (now unused) set to 114

#5 Updated by Marek Hulán about 1 year ago

  • Status changed from New to Closed

The original BZ was closed as wontfix.

Also available in: Atom PDF