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
db5497af
Commit
db5497af
authored
Oct 02, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the check if group is synced with ldap to a method.
parent
336b7b87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
app/models/group.rb
app/models/group.rb
+4
-0
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+1
-1
app/views/groups/_new_group_member.html.haml
app/views/groups/_new_group_member.html.haml
+1
-1
app/views/projects/team_members/_form.html.haml
app/views/projects/team_members/_form.html.haml
+1
-1
No files found.
app/models/group.rb
View file @
db5497af
...
...
@@ -90,6 +90,10 @@ class Group < Namespace
ldap_group_links
.
first
.
try
(
:group_access
)
end
def
ldap_synced?
ldap_cn
.
present?
end
class
<<
self
def
search
(
query
)
where
(
"LOWER(namespaces.name) LIKE :query"
,
query:
"%
#{
query
.
downcase
}
%"
)
...
...
app/views/admin/groups/show.html.haml
View file @
db5497af
...
...
@@ -87,7 +87,7 @@
=
form_tag
project_teams_update_admin_group_path
(
@group
),
id:
"new_team_member"
,
class:
"bulk_import"
,
method: :put
do
%div
=
users_select_tag
(
:user_ids
,
{
multiple:
true
,
skip_ldap:
@group
.
ldap_
cn
.
present
?
})
=
users_select_tag
(
:user_ids
,
{
multiple:
true
,
skip_ldap:
@group
.
ldap_
synced
?
})
%div
.prepend-top-10
=
select_tag
:group_access
,
options_for_select
(
UsersGroup
.
group_access_roles
),
class:
"project-access-select select2"
%hr
...
...
app/views/groups/_new_group_member.html.haml
View file @
db5497af
=
form_for
@users_group
,
url:
group_users_groups_path
(
@group
),
html:
{
class:
'form-horizontal users-group-form'
}
do
|
f
|
.form-group
=
f
.
label
:user_ids
,
"People"
,
class:
'control-label'
.col-sm-10
=
users_select_tag
(
:user_ids
,
{
multiple:
true
,
skip_ldap:
@group
.
ldap_
cn
.
present
?
,
class:
'input-large'
})
.col-sm-10
=
users_select_tag
(
:user_ids
,
{
multiple:
true
,
skip_ldap:
@group
.
ldap_
synced
?
,
class:
'input-large'
})
.form-group
=
f
.
label
:group_access
,
"Group Access"
,
class:
'control-label'
...
...
app/views/projects/team_members/_form.html.haml
View file @
db5497af
...
...
@@ -12,7 +12,7 @@
.form-group
=
f
.
label
:user_ids
,
"People"
,
class:
'control-label'
.col-sm-10
=
users_select_tag
(
:user_ids
,
{
multiple:
true
,
skip_ldap:
@project
.
group
.
ldap_
cn
.
present
?
})
=
users_select_tag
(
:user_ids
,
{
multiple:
true
,
skip_ldap:
@project
.
group
.
ldap_
synced
?
})
%p
2. Set access level for them
.form-group
...
...
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