Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
82693c40
Commit
82693c40
authored
Jul 01, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ee
parents
2f1f6dfd
f6cb4206
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
6 deletions
+32
-6
app/services/git_push_service.rb
app/services/git_push_service.rb
+1
-5
app/services/issues/close_service.rb
app/services/issues/close_service.rb
+5
-0
doc/integration/ldap.md
doc/integration/ldap.md
+21
-0
lib/gitlab/ldap/access.rb
lib/gitlab/ldap/access.rb
+5
-1
No files found.
app/services/git_push_service.rb
View file @
82693c40
...
...
@@ -84,11 +84,7 @@ class GitPushService
author
||=
commit_user
(
commit
)
issues_to_close
.
each
do
|
issue
|
if
project
.
jira_tracker?
&&
project
.
jira_service
.
active
project
.
jira_service
.
execute
(
commit
,
issue
)
else
Issues
::
CloseService
.
new
(
project
,
author
,
{}).
execute
(
issue
,
commit
)
end
Issues
::
CloseService
.
new
(
project
,
author
,
{}).
execute
(
issue
,
commit
)
end
end
...
...
app/services/issues/close_service.rb
View file @
82693c40
module
Issues
class
CloseService
<
Issues
::
BaseService
def
execute
(
issue
,
commit
=
nil
)
if
project
.
jira_tracker?
&&
project
.
jira_service
.
active
project
.
jira_service
.
execute
(
commit
,
issue
)
return
issue
end
if
project
.
default_issues_tracker?
&&
issue
.
close
event_service
.
close_issue
(
issue
,
current_user
)
create_note
(
issue
,
commit
)
...
...
doc/integration/ldap.md
View file @
82693c40
...
...
@@ -359,3 +359,24 @@ Here, `sync_time` is set to `1800` seconds, meaning the LDAP cache will expire e
For manual GitLab installations, simply uncomment the
`sync_time`
entry in your
`gitlab.yml`
and set it to the value you desire.
Please note that changing the LDAP sync time can influence the performance of your GitLab instance.
## What sort of queries can my LDAP server expect from GitLab EE?
Active GitLab users trigger 'permission updates' by signing in or
interacting with GitLab, and in addtion all GitLab users (active or not) get a
permission update during the daily sweep. The number of permission updates per
day depends on how many of your GitLab users are active and on how many
LDAP-enabled GitLab users exist in your GitLab SQL database.
During a 'permission update' for a user, GitLab does 1-2 queries for the
specific user, and 1 queries for each LDAP group known to GitLab. GitLab
fetches all available attributes of LDAP user and group objects on most
queries. If you use Active Directory, GitLab performs additional
'extensibleMatch' queries to check for nested group membership and whether the
user is blocked, one of each per user and group.
Note that usually not all user and group objects in an organization's LDAP tree
will be known to GitLab. GitLab only queries LDAP user objects corresponding to
users who use or have used GitLab. Similarly, GitLab only queries LDAP group
objects that have been (manually) linked to a GitLab group by a GitLab user or
administrator.
lib/gitlab/ldap/access.rb
View file @
82693c40
...
...
@@ -108,7 +108,7 @@ module Gitlab
ldap_email
=
ldap_user
.
email
.
last
.
to_s
.
downcase
return
false
if
user
.
email
==
ldap_email
user
.
skip_reconfirmation!
user
.
update
(
email:
ldap_email
)
end
...
...
@@ -131,6 +131,10 @@ module Gitlab
end
# Loop throug all ldap conneted groups, and update the users link with it
#
# We documented what sort of queries an LDAP server can expect from
# GitLab EE in doc/integration/ldap.md. Please remember to update that
# documentation if you change the algorithm below.
def
update_ldap_group_links
gitlab_groups_with_ldap_link
.
each
do
|
group
|
active_group_links
=
group
.
ldap_group_links
.
where
(
cn:
cns_with_access
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment