Unblock user if they were unblocked in AD.
This commit is contained in:
parent
606d24ff2d
commit
8fed435208
|
@ -60,7 +60,7 @@ v 7.9.0 (unreleased)
|
||||||
- Remove annoying notice messages when create/update merge request
|
- Remove annoying notice messages when create/update merge request
|
||||||
- Allow smb:// links in Markdown text.
|
- Allow smb:// links in Markdown text.
|
||||||
- Filter merge request by title or description at Merge Requests page
|
- Filter merge request by title or description at Merge Requests page
|
||||||
- Block user if he/she was blocked in Active Directory
|
- Block and unblock user if he/she was blocked/unblocked in Active Directory
|
||||||
|
|
||||||
v 7.8.4
|
v 7.8.4
|
||||||
- Fix issue_tracker_id substitution in custom issue trackers
|
- Fix issue_tracker_id substitution in custom issue trackers
|
||||||
|
|
|
@ -40,6 +40,7 @@ module Gitlab
|
||||||
user.block unless user.blocked?
|
user.block unless user.blocked?
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
|
user.activate if user.blocked?
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
@ -28,9 +28,18 @@ describe Gitlab::LDAP::Access do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'and has no disabled flag in active diretory' do
|
context 'and has no disabled flag in active diretory' do
|
||||||
before { Gitlab::LDAP::Person.stub(disabled_via_active_directory?: false) }
|
before do
|
||||||
|
user.block
|
||||||
|
|
||||||
|
Gitlab::LDAP::Person.stub(disabled_via_active_directory?: false)
|
||||||
|
end
|
||||||
|
|
||||||
it { is_expected.to be_truthy }
|
it { is_expected.to be_truthy }
|
||||||
|
|
||||||
|
it "should unblock user in GitLab" do
|
||||||
|
access.allowed?
|
||||||
|
user.should_not be_blocked
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'without ActiveDirectory enabled' do
|
context 'without ActiveDirectory enabled' do
|
||||||
|
|
Loading…
Reference in New Issue