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
f5d3e47e
Commit
f5d3e47e
authored
Dec 08, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide ldap group links if ldap is not enabled
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
230900b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+6
-0
app/controllers/groups/ldap_group_links_controller.rb
app/controllers/groups/ldap_group_links_controller.rb
+1
-0
app/views/groups/_settings_nav.html.haml
app/views/groups/_settings_nav.html.haml
+5
-4
No files found.
app/controllers/application_controller.rb
View file @
f5d3e47e
...
...
@@ -239,4 +239,10 @@ class ApplicationController < ActionController::Base
redirect_to
profile_path
,
notice:
'Please complete your profile with email address'
and
return
end
end
def
require_ldap_enabled
unless
Gitlab
.
config
.
ldap
.
enabled
render_404
and
return
end
end
end
app/controllers/groups/ldap_group_links_controller.rb
View file @
f5d3e47e
class
Groups::LdapGroupLinksController
<
ApplicationController
before_action
:group
before_action
:require_ldap_enabled
before_action
:authorize_admin_group!
layout
'group'
...
...
app/views/groups/_settings_nav.html.haml
View file @
f5d3e47e
...
...
@@ -7,10 +7,11 @@
=
link_to
projects_group_path
(
@group
)
do
%i
.fa.fa-folder
Projects
=
nav_link
(
controller: :ldap_group_links
)
do
=
link_to
group_ldap_group_links_path
(
@group
)
do
%i
.icon-exchange
LDAP Groups
-
if
ldap_enabled?
=
nav_link
(
controller: :ldap_group_links
)
do
=
link_to
group_ldap_group_links_path
(
@group
)
do
%i
.fa.fa-exchange
LDAP Groups
=
nav_link
(
controller: :audit_events
)
do
=
link_to
group_audit_events_path
(
@group
)
do
%i
.fa.fa-file-text-o
...
...
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