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
4578b751
Commit
4578b751
authored
Nov 20, 2017
by
Francisco Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing conflicts
parent
ba5a4de3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
54 deletions
+3
-54
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+0
-12
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+0
-3
lib/api/api_guard.rb
lib/api/api_guard.rb
+0
-4
lib/gitlab/auth/user_auth_finders.rb
lib/gitlab/auth/user_auth_finders.rb
+2
-17
lib/gitlab/git/wiki.rb
lib/gitlab/git/wiki.rb
+0
-4
spec/lib/gitlab/auth/user_auth_finders_spec.rb
spec/lib/gitlab/auth/user_auth_finders_spec.rb
+0
-6
spec/requests/api/helpers_spec.rb
spec/requests/api/helpers_spec.rb
+1
-8
No files found.
app/controllers/application_controller.rb
View file @
4578b751
...
...
@@ -96,7 +96,6 @@ class ApplicationController < ActionController::Base
# (e.g. tokens) to authenticate the user, whereas Devise sets current_user
def
auth_user
return
current_user
if
current_user
.
present?
<<<<<<<
HEAD
return
try
(
:authenticated_user
)
end
...
...
@@ -110,17 +109,6 @@ class ApplicationController < ActionController::Base
def
verify_namespace_plan_check_enabled
render_404
unless
current_application_settings
.
should_check_namespace_plan?
=======
return
try
(
:authenticated_user
)
end
# This filter handles personal access tokens, and atom requests with rss tokens
def
authenticate_sessionless_user!
user
=
Gitlab
::
Auth
::
RequestAuthenticator
.
new
(
request
).
find_sessionless_user
sessionless_sign_in
(
user
)
if
user
>>>>>>>
ce
-
com
/
master
end
def
log_exception
(
exception
)
...
...
app/views/admin/application_settings/_form.html.haml
View file @
4578b751
...
...
@@ -784,7 +784,6 @@
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'administration/polling'
)
%fieldset
<
<<<<<<
HEAD
%legend
Performance optimization
.form-group
.col-sm-offset-2.col-sm-10
...
...
@@ -837,8 +836,6 @@
status will time out.
%fieldset
==
=====
>
>>>>>> ce-com/master
%legend
User and IP Rate Limits
.form-group
.col-sm-offset-2.col-sm-10
...
...
lib/api/api_guard.rb
View file @
4578b751
...
...
@@ -39,10 +39,6 @@ module API
# Helper Methods for Grape Endpoint
module
HelperMethods
<<<<<<<
HEAD
include
Gitlab
::
Utils
::
StrongMemoize
=======
>>>>>>>
ce
-
com
/
master
include
Gitlab
::
Auth
::
UserAuthFinders
def
find_current_user!
...
...
lib/gitlab/auth/user_auth_finders.rb
View file @
4578b751
...
...
@@ -19,17 +19,12 @@ module Gitlab
end
module
UserAuthFinders
<<<<<<<
HEAD
PRIVATE_TOKEN_HEADER
=
'HTTP_PRIVATE_TOKEN'
.
freeze
PRIVATE_TOKEN_PARAM
=
:private_token
JOB_TOKEN_HEADER
=
"HTTP_JOB_TOKEN"
.
freeze
JOB_TOKEN_PARAM
=
:job_token
=======
include
Gitlab
::
Utils
::
StrongMemoize
PRIVATE_TOKEN_HEADER
=
'HTTP_PRIVATE_TOKEN'
.
freeze
PRIVATE_TOKEN_PARAM
=
:private_token
>>>>>>>
ce
-
com
/
master
JOB_TOKEN_HEADER
=
"HTTP_JOB_TOKEN"
.
freeze
JOB_TOKEN_PARAM
=
:job_token
# Check the Rails session for valid authentication details
def
find_user_from_warden
...
...
@@ -53,7 +48,6 @@ module Gitlab
access_token
.
user
||
raise
(
UnauthorizedError
)
end
<<<<<<<
HEAD
def
find_user_from_job_token
return
unless
route_authentication_setting
[
:job_token_allowed
]
...
...
@@ -68,8 +62,6 @@ module Gitlab
job
.
user
end
=======
>>>>>>>
ce
-
com
/
master
def
validate_access_token!
(
scopes:
[])
return
unless
access_token
...
...
@@ -85,23 +77,16 @@ module Gitlab
private
<<<<<<<
HEAD
def
route_authentication_setting
return
{}
unless
respond_to?
(
:route_setting
)
route_setting
(
:authentication
)
||
{}
end
def
access_token
return
@access_token
if
defined?
(
@access_token
)
@access_token
=
find_oauth_access_token
||
find_personal_access_token
=======
def
access_token
strong_memoize
(
:access_token
)
do
find_oauth_access_token
||
find_personal_access_token
end
>>>>>>>
ce
-
com
/
master
end
def
find_personal_access_token
...
...
lib/gitlab/git/wiki.rb
View file @
4578b751
...
...
@@ -101,11 +101,7 @@ module Gitlab
end
end
<<<<<<<
HEAD
def
count_page_versions
(
page_path
,
options
=
{})
=======
def
count_page_versions
(
page_path
)
>>>>>>>
ce
-
com
/
master
@repository
.
count_commits
(
ref:
'HEAD'
,
path:
page_path
)
end
...
...
spec/lib/gitlab/auth/user_auth_finders_spec.rb
View file @
4578b751
...
...
@@ -10,10 +10,7 @@ describe Gitlab::Auth::UserAuthFinders do
}
end
let
(
:request
)
{
Rack
::
Request
.
new
(
env
)}
<<<<<<<
HEAD
let
(
:params
)
{
request
.
params
}
=======
>>>>>>>
ce
-
com
/
master
def
set_param
(
key
,
value
)
request
.
update_param
(
key
,
value
)
...
...
@@ -105,7 +102,6 @@ describe Gitlab::Auth::UserAuthFinders do
end
end
<<<<<<<
HEAD
describe
'#find_user_from_job_token'
do
let
(
:job
)
{
create
(
:ci_build
,
user:
user
)
}
...
...
@@ -155,8 +151,6 @@ describe Gitlab::Auth::UserAuthFinders do
end
end
=======
>>>>>>>
ce
-
com
/
master
describe
'#find_personal_access_token'
do
let
(
:personal_access_token
)
{
create
(
:personal_access_token
,
user:
user
)
}
...
...
spec/requests/api/helpers_spec.rb
View file @
4578b751
...
...
@@ -23,10 +23,7 @@ describe API::Helpers do
}
end
let
(
:header
)
{
}
<<<<<<<
HEAD
let
(
:route_authentication_setting
)
{
{}
}
=======
>>>>>>>
ce
-
com
/
master
let
(
:request
)
{
Grape
::
Request
.
new
(
env
)}
let
(
:params
)
{
request
.
params
}
...
...
@@ -185,7 +182,6 @@ describe API::Helpers do
it
'does not allow expired tokens'
do
personal_access_token
.
update_attributes!
(
expires_at:
1
.
day
.
ago
)
env
[
Gitlab
::
Auth
::
UserAuthFinders
::
PRIVATE_TOKEN_HEADER
]
=
personal_access_token
.
token
<<<<<<<
HEAD
expect
{
current_user
}.
to
raise_error
Gitlab
::
Auth
::
ExpiredError
end
...
...
@@ -233,14 +229,11 @@ describe API::Helpers do
expect
(
current_user
).
to
be_nil
end
=======
expect
{
current_user
}.
to
raise_error
Gitlab
::
Auth
::
ExpiredError
>>>>>>>
ce
-
com
/
master
end
end
end
describe
'.handle_api_exception'
do
before
do
allow_any_instance_of
(
self
.
class
).
to
receive
(
:sentry_enabled?
).
and_return
(
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