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
372564b5
Commit
372564b5
authored
Dec 17, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE code from ApplicationController
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
e515725c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+3
-9
ee/app/controllers/ee/application_controller.rb
ee/app/controllers/ee/application_controller.rb
+21
-0
No files found.
app/controllers/application_controller.rb
View file @
372564b5
...
...
@@ -151,10 +151,6 @@ class ApplicationController < ActionController::Base
end
end
def
verify_namespace_plan_check_enabled
render_404
unless
Gitlab
::
CurrentSettings
.
should_check_namespace_plan?
end
def
log_exception
(
exception
)
Gitlab
::
Sentry
.
track_acceptable_exception
(
exception
)
...
...
@@ -169,11 +165,7 @@ class ApplicationController < ActionController::Base
end
def
after_sign_out_path_for
(
resource
)
if
Gitlab
::
Geo
.
secondary?
Gitlab
::
Geo
.
primary_node
.
oauth_logout_url
(
@geo_logout_state
)
else
Gitlab
::
CurrentSettings
.
after_sign_out_path
.
presence
||
new_user_session_path
end
Gitlab
::
CurrentSettings
.
after_sign_out_path
.
presence
||
new_user_session_path
end
def
can?
(
object
,
action
,
subject
=
:global
)
...
...
@@ -497,3 +489,5 @@ class ApplicationController < ActionController::Base
Gitlab
::
Sentry
.
context
(
current_user
)
end
end
ApplicationController
.
prepend
(
EE
::
ApplicationController
)
ee/app/controllers/ee/application_controller.rb
0 → 100644
View file @
372564b5
# frozen_string_literal: true
module
EE
module
ApplicationController
extend
ActiveSupport
::
Concern
extend
::
Gitlab
::
Utils
::
Override
def
verify_namespace_plan_check_enabled
render_404
unless
::
Gitlab
::
CurrentSettings
.
should_check_namespace_plan?
end
override
:after_sign_out_path_for
def
after_sign_out_path_for
(
resource
)
if
::
Gitlab
::
Geo
.
secondary?
::
Gitlab
::
Geo
.
primary_node
.
oauth_logout_url
(
@geo_logout_state
)
# rubocop:disable Gitlab/ModuleWithInstanceVariables
else
super
end
end
end
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