This is an automatically generated e-mail. To reply, visit:

Review request for Ambari, Di Li and Richard Zang.

Bugs: AMBARI-16861

Repository: ambari


Steps to reproduce this issue:
1. Create a few local users. I have created users "aaa", "bbb", "ccc" in my 
2. Create a view instance of your choice and assign one of the local users to 
this view instance. I have assigned user "aaa" to the a Jobs view instance.
3. Go to Manage Ambari -> Roles -> List View
4. You see the user "aaa" showing Cluster Role of "View User" and is not 
editable from this page. (attachment "view_user_for_user.tiff" on the JIRA)

I had recreated this issue using group also. Please find attachment 
"view_user_for_group.tiff" on JIRA showing the List View for the case of group 
assigned with View User permission alone.

Since View Permissions must not be mixed with the Cluster Permissions, the 
proposed fix should show Cluster Permission of "None" for users who have only 
"View User" permissions and no Cluster Permissions. This would allow the ambari 
user to edit the Cluster Permissions of the local users from the List View page.
Note: A workaround found to edit such users' Cluster Permissions is to go to 
the Block View and assign some Cluster Permission. Then the List View shows the 
Cluster Permission and is editable.



Diff: https://reviews.apache.org/r/47836/diff/


I have added a test case for the function "pickEffectivePrivilege" which checks 
if the effective privilege of a user/group is "VIEW.USER". If it is, then the 
privilege returned is "CLUSTER.NONE", otherwise the calculated effective 
privilege is returned.

I have attached the result of tests run for ambari-admin in the attachments 
"ambari_admin_test_cases_before_fix.tiff" and 
"ambari_admin_test_cases_after_fix.tiff" on the JIRA.


Keta Patel

Reply via email to