Bug 1158850
Summary: | undefined local variable or method `anonymous_admin' when non-Administrator accesses katello/dashboard or try to register client | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Pavel Moravec <pmoravec> |
Component: | Users & Roles | Assignee: | Katello Bug Bin <katello-bugs> |
Status: | CLOSED ERRATA | QA Contact: | Corey Welton <cwelton> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.0.4 | CC: | aladke, bbuckingham, bkearney, cwelton, hannsj_uhl, ktordeur, mtaru, nobody, sthirugn |
Target Milestone: | Unspecified | Keywords: | TestCaseProvided, Triaged |
Target Release: | Unused | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 08:46:00 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Pavel Moravec
2014-10-30 11:23:45 UTC
Commit for #6870/BZ1075523 changed "hidden" to "anonymous_admin" but that apparently does not work in allowed_organizations method: def allowed_organizations (admin? || anonymous_admin) ? Organization.all : self.organizations end that raises "undefined local variable or method" VERIFIED: # rpm -qa | grep foreman foreman-gce-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch hp-bl465cg7-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch hp-bl465cg7-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch foreman-release-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch foreman-ovirt-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch foreman-libvirt-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch foreman-postgresql-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch foreman-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch hp-bl465cg7-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch tfm-rubygem-foreman_discovery-4.1.2-1.fm1_11.el7.noarch foreman-compute-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch foreman-debug-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch foreman-proxy-1.11.0-0.develop.201511020918git26aba85.el7.noarch foreman-vmware-1.11.0-0.develop.201511062002gitd3c978e.el7.noarch tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510201150gitab068d9.el7.noarch tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch foreman-release-scl-1-1.el7.x86_64 tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch steps: 1. Create a user with whatever permissions/roles/filters you want, but without "Administrator" set. 2. Login as that user. 3. Click to Monitor -> Content Dashboard (i.e. to page katello/dashboard) 4. Check result & tail of /var/log/foreman/production.log No error in production.log # tail -f /var/log/foreman/production.log 2015-11-10 03:42:24 [app] [I] Rendered common/_searchbar.html.erb (7.8ms) 2015-11-10 03:42:24 [app] [I] Rendered home/_user_dropdown.html.erb (2.4ms) 2015-11-10 03:42:24 [app] [I] Read fragment views/tabs_and_title_records-4 (0.2ms) 2015-11-10 03:42:24 [app] [I] Rendered home/_topbar.html.erb (4.0ms) 2015-11-10 03:42:24 [app] [I] Rendered layouts/base.html.erb (6.1ms) 2015-11-10 03:42:24 [app] [I] Completed 200 OK in 76ms (Views: 28.7ms | ActiveRecord: 12.5ms) 2015-11-10 03:42:30 [app] [I] Connecting to database specified by database.yml 2015-11-10 03:43:26 [foreman-tasks/dynflow] [I] start terminating client dispatcher... 2015-11-10 03:43:26 [foreman-tasks/dynflow] [I] stop listening for new events... 2015-11-10 03:43:26 [foreman-tasks/dynflow] [I] start terminating clock... 2015-11-10 03:47:32 [app] [I] | | Started GET "/node/hp-bl465cg7-01.rhts.eng.bos.redhat.com?format=yml" for 2620:52:0:1040:1aa9:5ff:fec5:2f5c at 2015-11-10 03:47:32 -0500 2015-11-10 03:47:32 [app] [I] Processing by HostsController#externalNodes as YML 2015-11-10 03:47:32 [app] [I] Parameters: {"name"=>"hp-bl465cg7-01.rhts.eng.bos.redhat.com"} 2015-11-10 03:47:34 [app] [I] Rendered text template (0.0ms) 2015-11-10 03:47:34 [app] [I] Completed 200 OK in 1957ms (Views: 11.3ms | ActiveRecord: 31.4ms) 2015-11-10 03:47:36 [app] [I] | | Started POST "/api/hosts/facts" for 2620:52:0:1040:1aa9:5ff:fec5:2f5c at 2015-11-10 03:47:36 -0500 2015-11-10 03:47:37 [app] [I] Processing by Api::V2::HostsController#facts as JSON 2015-11-10 03:47:37 [app] [I] Parameters: {"facts"=>"[FILTERED]", "name"=>"hp-bl465cg7-01.rhts.eng.bos.redhat.com", "certname"=>"hp-bl465cg7-01.rhts.eng.bos.redhat.com", "apiv"=>"v2", :host=>{"name"=>"hp-bl465cg7-01.rhts.eng.bos.redhat.com", "certname"=>"hp-bl465cg7-01.rhts.eng.bos.redhat.com"}} 2015-11-10 03:47:37 [app] [I] Import facts for 'hp-bl465cg7-01.rhts.eng.bos.redhat.com' completed. Added: 0, Updated: 6, Deleted 0 facts 2015-11-10 03:47:38 [app] [I] Completed 201 Created in 759ms (Views: 7.1ms | ActiveRecord: 0.0ms) 2015-11-10 03:47:53 [app] [I] | | Started GET "/node/hp-bl465cg7-01.rhts.eng.bos.redhat.com?format=yml" for 2620:52:0:1040:1aa9:5ff:fec5:2f5c at 2015-11-10 03:47:53 -0500 2015-11-10 03:47:53 [app] [I] Processing by HostsController#externalNodes as YML 2015-11-10 03:47:53 [app] [I] Parameters: {"name"=>"hp-bl465cg7-01.rhts.eng.bos.redhat.com"} 2015-11-10 03:47:54 [app] [I] Rendered text template (0.0ms) 2015-11-10 03:47:54 [app] [I] Completed 200 OK in 946ms (Views: 1.1ms | ActiveRecord: 10.9ms) 2015-11-10 03:47:55 [app] [I] | | Started POST "/api/reports" for 2620:52:0:1040:1aa9:5ff:fec5:2f5c at 2015-11-10 03:47:55 -0500 2015-11-10 03:47:55 [app] [I] Processing by Api::V2::ReportsController#create as JSON 2015-11-10 03:47:55 [app] [I] Parameters: {"report"=>"[FILTERED]", "apiv"=>"v2"} 2015-11-10 03:47:55 [app] [I] processing report for hp-bl465cg7-01.rhts.eng.bos.redhat.com 2015-11-10 03:47:55 [app] [I] Imported report for hp-bl465cg7-01.rhts.eng.bos.redhat.com in 0.06 seconds 2015-11-10 03:47:55 [app] [I] Rendered api/v2/reports/create.json.rabl (17.4ms) 2015-11-10 03:47:55 [app] [I] Completed 201 Created in 167ms (Views: 23.4ms | ActiveRecord: 16.0ms) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1500 |