forked from External/greenlight
Roles editor bug fix (#721)
* Allow users with just the manage users permission to edit roles * Allow users with just the manage users permission to edit roles * Fix update recordings bug
This commit is contained in:
committed by
Jesus Federico
parent
60f5cd5c81
commit
e1fdc8f58b
@ -21,10 +21,11 @@
|
||||
<div class="offset-3 col-6 offset-3">
|
||||
<div class="card">
|
||||
<div class="card-status bg-primary"></div>
|
||||
<div class="card-header">
|
||||
<div class="card-header cant-create-rooms-title">
|
||||
<h3 class="card-title"><%= t("room.no_room.title") %></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p><%= t("room.no_room.description") %></p>
|
||||
<%= form_for(:join_room, url: join_room_path) do |f| %>
|
||||
<div class="input-icon mb-2">
|
||||
<span class="input-icon-addon">
|
||||
|
@ -46,7 +46,7 @@
|
||||
<% @user.roles.by_priority.each do |role| %>
|
||||
<span id="<%= "user-role-tag_#{role.id}" %>" style="<%= "background-color: #{role_colour(role)};border-color: #{role_colour(role)};" %>" class="tag user-role-tag">
|
||||
<%= translated_role_name(role) %>
|
||||
<% if (current_user_role.can_edit_roles || current_user_role.name == "super_admin") && (role.priority > current_user_role.priority || current_user_role.name == "admin") %>
|
||||
<% if (current_user_role.can_manage_users || current_user_role.name == "super_admin") && (role.priority > current_user_role.priority || current_user_role.name == "admin") %>
|
||||
<a data-role-id="<%= role.id %>" class="tag-addon clear-role">
|
||||
<i data-role-id="<%= role.id %>" class="fas fa-times"></i>
|
||||
</a>
|
||||
@ -54,7 +54,7 @@
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if current_user_role.can_edit_roles || current_user_role.name == "super_admin" %>
|
||||
<% if current_user_role.can_manage_users || current_user_role.name == "super_admin" %>
|
||||
<% provider = Rails.configuration.loadbalanced_configuration ? current_user.provider : "greenlight" %>
|
||||
<%= f.select :roles, Role.editable_roles(@user_domain).map{|role| [translated_role_name(role), role.id, {'data-colour' => role_colour(role)}]}.unshift(["", nil, {'data-colour' => nil}]), {disabled: disabled_roles(@user)}, { class: "form-control custom-select", id: "role-select-dropdown" } %>
|
||||
<% end %>
|
||||
|
Reference in New Issue
Block a user