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
dc72c135
Commit
dc72c135
authored
Nov 15, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix EE-specific offenses to the LineBreakAfterGuardClauses cop
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
63a0f8e2
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
21 additions
and
0 deletions
+21
-0
app/services/oauth2/logout_token_validation_service.rb
app/services/oauth2/logout_token_validation_service.rb
+1
-0
app/services/projects/update_repository_storage_service.rb
app/services/projects/update_repository_storage_service.rb
+1
-0
config/initializers/0_as_concern.rb
config/initializers/0_as_concern.rb
+1
-0
db/migrate/20170920091408_add_index_for_pushrules_is_sample.rb
...grate/20170920091408_add_index_for_pushrules_is_sample.rb
+2
-0
ee/app/models/concerns/ee/kubernetes_service.rb
ee/app/models/concerns/ee/kubernetes_service.rb
+1
-0
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+1
-0
ee/app/models/license.rb
ee/app/models/license.rb
+1
-0
ee/app/models/remote_mirror.rb
ee/app/models/remote_mirror.rb
+1
-0
ee/app/services/ldap_group_reset_service.rb
ee/app/services/ldap_group_reset_service.rb
+1
-0
ee/app/workers/repository_update_remote_mirror_worker.rb
ee/app/workers/repository_update_remote_mirror_worker.rb
+1
-0
lib/elasticsearch/git/repository.rb
lib/elasticsearch/git/repository.rb
+4
-0
lib/gitlab/geo/oauth_session.rb
lib/gitlab/geo/oauth_session.rb
+2
-0
lib/gitlab/gitaly_client/wiki_service.rb
lib/gitlab/gitaly_client/wiki_service.rb
+1
-0
lib/gitlab/ldap/access.rb
lib/gitlab/ldap/access.rb
+2
-0
lib/gitlab/shell.rb
lib/gitlab/shell.rb
+1
-0
No files found.
app/services/oauth2/logout_token_validation_service.rb
View file @
dc72c135
...
...
@@ -9,6 +9,7 @@ module Oauth2
def
execute
return
error
(
'access token not found'
)
unless
access_token
status
=
AccessTokenValidationService
.
new
(
access_token
).
validate
if
status
==
AccessTokenValidationService
::
VALID
...
...
app/services/projects/update_repository_storage_service.rb
View file @
dc72c135
...
...
@@ -69,6 +69,7 @@ module Projects
# Try for 30 seconds, polling every 10
3
.
times
do
return
true
if
reference_counter
.
value
==
0
sleep
10
end
...
...
config/initializers/0_as_concern.rb
View file @
dc72c135
...
...
@@ -7,6 +7,7 @@ module Prependable
return
false
else
return
false
if
base
<
self
super
base
.
singleton_class
.
send
(
:prepend
,
const_get
(
'ClassMethods'
))
if
const_defined?
(
:ClassMethods
)
@_dependencies
.
each
{
|
dep
|
base
.
send
(
:prepend
,
dep
)
}
...
...
db/migrate/20170920091408_add_index_for_pushrules_is_sample.rb
View file @
dc72c135
...
...
@@ -35,11 +35,13 @@ class AddIndexForPushrulesIsSample < ActiveRecord::Migration
def
up
return
if
index_exists?
:push_rules
,
:is_sample
add_concurrent_index
(
:push_rules
,
:is_sample
,
where:
"is_sample"
)
end
def
down
return
unless
index_exists?
:push_rules
,
:is_sample
remove_concurrent_index
(
:push_rules
,
:is_sample
,
where:
"is_sample"
)
end
end
ee/app/models/concerns/ee/kubernetes_service.rb
View file @
dc72c135
...
...
@@ -31,6 +31,7 @@ module EE
kubeclient
.
get_deployments
(
namespace:
actual_namespace
).
as_json
rescue
KubeException
=>
err
raise
err
unless
err
.
error_code
==
404
[]
end
end
...
...
ee/app/models/ee/project.rb
View file @
dc72c135
...
...
@@ -366,6 +366,7 @@ module EE
def
username_only_import_url
bare_url
=
read_attribute
(
:import_url
)
return
bare_url
unless
::
Gitlab
::
UrlSanitizer
.
valid?
(
bare_url
)
::
Gitlab
::
UrlSanitizer
.
new
(
bare_url
,
credentials:
{
user:
import_data
&
.
user
}).
full_url
end
...
...
ee/app/models/license.rb
View file @
dc72c135
...
...
@@ -177,6 +177,7 @@ class License < ActiveRecord::Base
license
=
self
.
last
return
unless
license
&&
license
.
valid?
license
end
end
...
...
ee/app/models/remote_mirror.rb
View file @
dc72c135
...
...
@@ -111,6 +111,7 @@ class RemoteMirror < ActiveRecord::Base
def
url
=
(
value
)
return
super
(
value
)
unless
Gitlab
::
UrlSanitizer
.
valid?
(
value
)
mirror_url
=
Gitlab
::
UrlSanitizer
.
new
(
value
)
self
.
credentials
=
mirror_url
.
credentials
...
...
ee/app/services/ldap_group_reset_service.rb
View file @
dc72c135
...
...
@@ -8,6 +8,7 @@ class LdapGroupResetService
group
.
members
.
with_ldap_dn
.
map
do
|
member
|
# don't unauthorize the current user
next
if
current_user
==
member
.
user
member
.
update_attribute
:access_level
,
Gitlab
::
Access
::
GUEST
end
...
...
ee/app/workers/repository_update_remote_mirror_worker.rb
View file @
dc72c135
...
...
@@ -19,6 +19,7 @@ class RepositoryUpdateRemoteMirrorWorker
return
if
remote_mirror
.
updated_since?
(
scheduled_time
)
raise
UpdateAlreadyInProgressError
if
remote_mirror
.
update_in_progress?
remote_mirror
.
update_start
project
=
remote_mirror
.
project
...
...
lib/elasticsearch/git/repository.rb
View file @
dc72c135
...
...
@@ -85,10 +85,12 @@ module Elasticsearch
bulk_operations
=
slice
.
map
do
|
delta
|
if
delta
.
status
==
:deleted
next
if
delta
.
old_file
[
:mode
].
to_s
(
8
)
==
"160000"
b
=
LiteBlob
.
new
(
repository_for_indexing
,
delta
.
old_file
)
delete_blob
(
b
)
else
next
if
delta
.
new_file
[
:mode
].
to_s
(
8
)
==
"160000"
b
=
LiteBlob
.
new
(
repository_for_indexing
,
delta
.
new_file
)
index_blob
(
b
,
to
)
end
...
...
@@ -112,6 +114,7 @@ module Elasticsearch
def
delete_blob
(
blob
)
return
unless
blob
.
text?
{
delete:
{
_index:
"
#{
self
.
class
.
index_name
}
"
,
...
...
@@ -124,6 +127,7 @@ module Elasticsearch
def
index_blob
(
blob
,
target_sha
)
return
unless
can_index_blob?
(
blob
)
{
index:
{
_index:
"
#{
self
.
class
.
index_name
}
"
,
...
...
lib/gitlab/geo/oauth_session.rb
View file @
dc72c135
...
...
@@ -9,9 +9,11 @@ module Gitlab
def
oauth_state_valid?
return
false
unless
state
salt
,
hmac
,
return_to
=
state
.
split
(
':'
,
3
)
return
false
unless
return_to
hmac
==
generate_oauth_hmac
(
salt
,
return_to
)
end
...
...
lib/gitlab/gitaly_client/wiki_service.rb
View file @
dc72c135
...
...
@@ -94,6 +94,7 @@ module Gitlab
page
,
version
=
wiki_page_from_iterator
(
response
)
{
|
message
|
message
.
end_of_page
}
break
unless
page
&&
version
pages
<<
[
page
,
version
]
end
...
...
lib/gitlab/ldap/access.rb
View file @
dc72c135
...
...
@@ -154,8 +154,10 @@ module Gitlab
# there can be only one Kerberos identity in GitLab; if the user has a Kerberos identity in AD,
# replace any existing Kerberos identity for the user
return
unless
ldap_user
.
kerberos_principal
.
present?
kerberos_identity
=
user
.
identities
.
where
(
provider: :kerberos
).
first
return
if
kerberos_identity
&&
kerberos_identity
.
extern_uid
==
ldap_user
.
kerberos_principal
kerberos_identity
||=
Identity
.
new
(
provider: :kerberos
,
user:
user
)
kerberos_identity
.
extern_uid
=
ldap_user
.
kerberos_principal
unless
kerberos_identity
.
save
...
...
lib/gitlab/shell.rb
View file @
dc72c135
...
...
@@ -426,6 +426,7 @@ module Gitlab
args
=
[
gitlab_shell_projects_path
,
'delete-remote-branches'
,
storage
,
"
#{
project_name
}
.git"
,
remote_name
,
*
branch_names
]
output
,
status
=
Popen
.
popen
(
args
)
raise
Error
,
output
unless
status
.
zero?
true
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