Bug 754526 - Cannot unset a user's default env
Summary: Cannot unset a user's default env
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Tom McKay
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-11-16 18:18 UTC by Tom McKay
Modified: 2019-09-25 21:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:07:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
can view the env under selected org (34.28 KB, image/png)
2011-12-22 08:30 UTC, Sachin Ghai
no flags Details
can set the No default organization" too, (34.97 KB, image/png)
2011-12-22 08:32 UTC, Sachin Ghai
no flags Details

Description Tom McKay 2011-11-16 18:18:15 UTC
After choosing an org and an env, save the user. Upon choosing 'No Default Organization', the displayed environments should disappear and allow saving with result being that no default org/env is now set.

Comment 1 Tom McKay 2011-12-08 15:14:29 UTC
commit 49be4366793ccd49fc30bafb8b02c87064cef2b9
Author: Tom McKay <thomasmckay>
Date:   Thu Dec 8 10:09:25 2011 -0500

    + Bug 754526 - Cannot unset a user's default env
      https://bugzilla.redhat.com/show_bug.cgi?id=754526
      Choosing "No Default Organization" works now
    + Bug 754855 - User cannot change default system environment on their own
      https://bugzilla.redhat.com/show_bug.cgi?id=754855
      User editing own account now allows editing of default env
    + Bug 760563 - User cannot see their roles & permissions
      https://bugzilla.redhat.com/show_bug.cgi?id=760563
      User editing their own account can see (but not modify) their roles
    + Bug 760635 - Creating new user with "No Default Organization" is awkward/broken.
      https://bugzilla.redhat.com/show_bug.cgi?id=760635
      Save button on Environments tab now properly enables/disables based upon
      current choice vs. current default.

Comment 2 Sachin Ghai 2011-12-22 08:28:18 UTC
verified with following katello build:

[root@dhcp201-162 ~]# rpm -qa | grep katello
katello-0.1.154-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-cli-common-0.1.30-1.el6.noarch
katello-glue-pulp-0.1.154-1.el6.noarch
katello-configure-0.1.46-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-glue-candlepin-0.1.154-1.el6.noarch
katello-all-0.1.154-1.el6.noarch
katello-repos-0.1.4-1.el6.noarch
katello-cli-0.1.30-1.el6.noarch
katello-glue-foreman-0.1.154-1.el6.noarch
katello-common-0.1.154-1.el6.noarch
katello-certs-tools-1.0.1-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
[root@dhcp201-162 ~]# rpm -qa | grep katello-cli
katello-cli-common-0.1.30-1.el6.noarch
katello-cli-0.1.30-1.el6.noarch
[root@dhcp201-162 ~]# 

At the time of user creation when i specified the "ACME_Corporation" organization, I wss able to see the env under that org . See attachement1.

However in other case, while keeping the "No default org", displayed env disappeared. attachement2

Comment 3 Sachin Ghai 2011-12-22 08:30:45 UTC
Created attachment 549144 [details]
can view the env under selected org

Comment 4 Sachin Ghai 2011-12-22 08:32:15 UTC
Created attachment 549145 [details]
can set the No default organization" too,

Comment 6 Tom McKay 2012-02-01 17:08:55 UTC
Regression

tarted PUT "/katello/users/1/update_environment" for 10.11.230.24 at Wed Feb 01 12:04:38 -0500 2012
  Processing by UsersController#update_environment as 
  Parameters: {"id"=>"1"}
Setting locale: en
Setting current user thread-local variable to admin
Authorizing admin for users/update_environment
Setting current user thread-local variable to nil
User admin is not allowed to access users/update_environment
User admin is not allowed to access users/update_environment
#<Errors::SecurityViolation: User admin is not allowed to access users/update_environment>
/home/tomckay/code/katello/src/lib/authorization_rules.rb:31:in `authorize'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:458:in `_run__434435962__process_action__1602723082__callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:221:in `_conditional_callback_around_22027'
/home/tomckay/code/katello/src/lib/util/threadsession.rb:79:in `thread_locals'

Comment 7 Tom McKay 2012-02-01 17:26:49 UTC
commit 41f20fb9444839cc19c4f16ef1701dbb2e5cbc4d
Author: Tom McKay <thomasmckay>
Date:   Wed Feb 1 12:25:19 2012 -0500

    754526 - RBAC rules were preventing unset of default env

To test, set a default env for a user, refresh the page, then set to "no default". This should succeed and refresh page should now show no default.

Comment 8 Garik Khachikyan 2012-02-10 14:54:17 UTC
# VERIFIED

Following scenarios succeed:

1. create user with setting default org/env. choose "No default org". Updating properly the env section.
2. create user with no default org. choose a default or/env. After save it's updating properly.

playing with setting/unsetting the org/env pairs - all looks functional.

Checked against version:
katello-0.1.230-1.git.0.7ea815b.el6.noarch


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