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
200b70f2
Commit
200b70f2
authored
Sep 28, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update validation
parent
915ac40d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/models/ldap_group_link.rb
app/models/ldap_group_link.rb
+3
-3
No files found.
app/models/ldap_group_link.rb
View file @
200b70f2
...
@@ -5,18 +5,18 @@ class LdapGroupLink < ActiveRecord::Base
...
@@ -5,18 +5,18 @@ class LdapGroupLink < ActiveRecord::Base
BLANK_ATTRIBUTES
=
%w[cn filter]
.
freeze
BLANK_ATTRIBUTES
=
%w[cn filter]
.
freeze
with_options
if: :cn
do
|
link
|
with_options
if: :cn
do
|
link
|
link
.
validates
:cn
,
:group_access
,
:group_id
,
presence:
true
link
.
validates
:cn
,
uniqueness:
{
scope:
[
:group_id
,
:provider
]
}
link
.
validates
:cn
,
uniqueness:
{
scope:
[
:group_id
,
:provider
]
}
link
.
validates
:cn
,
presence:
true
link
.
validates
:filter
,
absence:
true
link
.
validates
:filter
,
absence:
true
end
end
with_options
if: :filter
do
|
link
|
with_options
if: :filter
do
|
link
|
link
.
validates
:filter
,
:group_access
,
:group_id
,
presence:
true
link
.
validates
:filter
,
uniqueness:
{
scope:
[
:group_id
,
:provider
]
}
link
.
validates
:filter
,
uniqueness:
{
scope:
[
:group_id
,
:provider
]
}
link
.
validates
:filter
,
ldap_filter:
true
link
.
validates
:filter
,
ldap_filter:
true
,
presence:
true
link
.
validates
:cn
,
absence:
true
link
.
validates
:cn
,
absence:
true
end
end
validates
:group_access
,
:group_id
,
presence:
true
validates
:group_access
,
inclusion:
{
in:
Gitlab
::
Access
.
all_values
}
validates
:group_access
,
inclusion:
{
in:
Gitlab
::
Access
.
all_values
}
validates
:provider
,
presence:
true
validates
:provider
,
presence:
true
...
...
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