Commit 96883914 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'mk/fix-ldap-group-sync-permission-override' into 'master'

Fix LDAP group sync permission override UI

Closes #5301

See merge request gitlab-org/gitlab-ee!5003
parents 27db2abb 9ac7dcb8
......@@ -62,7 +62,7 @@
= f.hidden_field :access_level
.member-form-control.dropdown.append-right-5
%button.dropdown-menu-toggle.js-member-permissions-dropdown{ type: "button",
disabled: member.can_override?,
disabled: member.can_override? && !member.override?,
data: { toggle: "dropdown", field_name: "#{f.object_name}[access_level]" } }
%span.dropdown-toggle-text
= member.human_access
......@@ -82,7 +82,7 @@
can_override: member.can_override?
.prepend-left-5.clearable-input.member-form-control
= f.text_field :expires_at,
disabled: member.can_override?,
disabled: member.can_override? && !member.override?,
class: 'form-control js-access-expiration-date js-member-update-control',
placeholder: 'Expiration date',
id: "member_expires_at_#{member.id}",
......
---
title: Fix LDAP group sync permission override UI
merge_request: 5003
author:
type: fixed
......@@ -58,6 +58,13 @@ feature 'Groups > Members > Master/Owner can override LDAP access levels' do
expect(page).not_to have_content ldap_override_message
expect(page).not_to have_button 'Change permissions'
within "#group_member_#{ldap_member.id}" do
expect(page).not_to have_button 'Edit permissions'
expect(page).to have_button 'Guest', disabled: false
end
refresh # controls should still be enabled after a refresh
within "#group_member_#{ldap_member.id}" do
expect(page).not_to have_button 'Edit permissions'
expect(page).to have_button 'Guest', disabled: false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment