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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
be1120e9
Commit
be1120e9
authored
May 14, 2014
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve ad_disabled method name
parent
a966f722
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/ldap/access.rb
lib/gitlab/ldap/access.rb
+1
-1
lib/gitlab/ldap/person.rb
lib/gitlab/ldap/person.rb
+1
-1
spec/lib/gitlab/ldap/ldap_access_spec.rb
spec/lib/gitlab/ldap/ldap_access_spec.rb
+2
-2
No files found.
lib/gitlab/ldap/access.rb
View file @
be1120e9
...
...
@@ -15,7 +15,7 @@ module Gitlab
def
allowed?
(
user
)
if
Gitlab
::
LDAP
::
Person
.
find_by_dn
(
user
.
extern_uid
,
adapter
)
!
Gitlab
::
LDAP
::
Person
.
a
d
_disabled?
(
user
.
extern_uid
,
adapter
)
!
Gitlab
::
LDAP
::
Person
.
a
ctive_directory
_disabled?
(
user
.
extern_uid
,
adapter
)
else
false
end
...
...
lib/gitlab/ldap/person.rb
View file @
be1120e9
...
...
@@ -16,7 +16,7 @@ module Gitlab
adapter
.
user
(
'dn'
,
dn
)
end
def
self
.
a
d
_disabled?
(
dn
,
adapter
=
nil
)
def
self
.
a
ctive_directory
_disabled?
(
dn
,
adapter
=
nil
)
adapter
||=
Gitlab
::
LDAP
::
Adapter
.
new
adapter
.
dn_matches_filter?
(
dn
,
AD_USER_DISABLED
)
end
...
...
spec/lib/gitlab/ldap/ldap_access_spec.rb
View file @
be1120e9
...
...
@@ -17,13 +17,13 @@ describe Gitlab::LDAP::Access do
before
{
Gitlab
::
LDAP
::
Person
.
stub
(
find_by_dn: :ldap_user
)
}
context
'and the Active Directory disabled flag is set'
do
before
{
Gitlab
::
LDAP
::
Person
.
stub
(
a
d
_disabled?:
true
)
}
before
{
Gitlab
::
LDAP
::
Person
.
stub
(
a
ctive_directory
_disabled?:
true
)
}
it
{
should
be_false
}
end
context
'and the Active Directory disabled flag is not set'
do
before
{
Gitlab
::
LDAP
::
Person
.
stub
(
a
d
_disabled?:
false
)
}
before
{
Gitlab
::
LDAP
::
Person
.
stub
(
a
ctive_directory
_disabled?:
false
)
}
it
{
should
be_true
}
end
...
...
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