gitlab-org--gitlab-foss/lib/gitlab
Douwe Maan 4d64a32c88 Merge branch 'feature/ldap-sync-edgecases' into 'master'
LDAP Sync blocked user edgecases

Allow GitLab admins to block otherwise valid GitLab LDAP users
(https://gitlab.com/gitlab-org/gitlab-ce/issues/3462)

Based on the discussion on the original issue, we are going to differentiate "normal" block operations to the ldap automatic ones in order to make some decisions when its one or the other.

Expected behavior:

- [x] "ldap_blocked" users respond to both `blocked?` and `ldap_blocked?`
- [x] "ldap_blocked" users can't be unblocked by the Admin UI
- [x] "ldap_blocked" users can't be unblocked by the API
- [x] Block operations that are originated from LDAP synchronization will flag user as "ldap_blocked"
- [x] Only "ldap_blocked" users will be automatically unblocked by LDAP synchronization
- [x] When LDAP identity is removed, we should convert `ldap_blocked` into `blocked`
 
Mockup for the Admin UI with both "ldap_blocked" and normal "blocked" users:
![image](/uploads/4f56fc17b73cb2c9e2a154a22e7ad291/image.png)

There will be another MR for the EE version.

See merge request !2242
2016-01-14 11:00:08 +00:00
..
backend
bitbucket_import
diff
email
fogbugz_import
git
github_import
gitlab_import
gitorious_import
google_code_import
graphs
ldap Merge branch 'feature/ldap-sync-edgecases' into 'master' 2016-01-14 11:00:08 +00:00
lfs
markdown
metrics Randomize metrics sample intervals 2016-01-13 12:57:46 +01:00
middleware
o_auth
sherlock
sidekiq_middleware
sql
access.rb
app_logger.rb
asciidoc.rb
auth.rb
bitbucket_import.rb
build_data_builder.rb
closing_issue_extractor.rb
color_schemes.rb
compare_result.rb
config_helper.rb
contributions_calendar.rb
contributor.rb
current_settings.rb
database.rb
force_push_check.rb
git.rb
git_access.rb
git_access_status.rb
git_access_wiki.rb
git_logger.rb
git_ref_validator.rb
gitorious_import.rb
identifier.rb
import_formatter.rb
import_sources.rb
incoming_email.rb
inline_diff.rb
issues_labels.rb
key_fingerprint.rb
logger.rb
markup_helper.rb
metrics.rb
note_data_builder.rb
popen.rb
production_logger.rb
project_search_results.rb
push_data_builder.rb
recaptcha.rb
reference_extractor.rb
regex.rb
search_results.rb
seeder.rb
sherlock.rb
sidekiq_logger.rb
snippet_search_results.rb
themes.rb
upgrader.rb
uploads_transfer.rb
url_builder.rb
user_access.rb
utils.rb
version_info.rb
visibility_level.rb