Skip to content

Commit

Permalink
azhop admins are CC super user and Admin (#1820)
Browse files Browse the repository at this point in the history
  • Loading branch information
xpillons authored Jan 24, 2024
1 parent 85b2e59 commit 3893819
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 0 additions & 6 deletions playbooks/roles/cyclecloud/files/user_role_record.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ Description = "Basic GUI access"
GroupRole = false
Name = "User"
Allow = {"Package.Release/View","System/AccessWebSite","Alerts/Manage","Clusters/View","Clusters/Access", "Fixed.ClusterMetadata"}

AdType = "Application.Role"
Description = "AZHOP Cluster Admin"
GroupRole = false
Name = "azhop Cluster Admin"
Allow = {"Clusters/Manage", "Fixed.ClusterMetadata"}
5 changes: 3 additions & 2 deletions playbooks/templates/local_user_record.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ AdType = "AuthenticatedUser"
Name = "{{ user.name }}"
Authentication = "internal"
{% if (usergroups | selectattr('gid', 'in', (user.groups | default([], true))) | selectattr('name', 'match', 'azhop-admins') | map(attribute='name') | count ) > 0 %}
Roles = {"azhop Cluster Admin"}
Roles = {"Administrator"}
Superuser = true
{% else %}
Roles = {"User"}
Superuser = false
{% endif %}
UID = {{ user.uid }}
Superuser = false
RawPassword = "{{password.stdout}}"
5 changes: 3 additions & 2 deletions playbooks/templates/user_record.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ AdType = "AuthenticatedUser"
Name = "{{ user.name }}"
Authentication = "active_directory"
{% if (usergroups | selectattr('gid', 'in', (user.groups | default([], true))) | selectattr('name', 'match', 'azhop-admins') | map(attribute='name') | count ) > 0 %}
Roles = {"azhop Cluster Admin"}
Roles = {"Administrator"}
Superuser = true
{% else %}
Roles = {"User"}
Superuser = false
{% endif %}
UID = {{ user.uid }}
Superuser = false

{% endfor %}

0 comments on commit 3893819

Please sign in to comment.