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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
c0ebfea6
Commit
c0ebfea6
authored
Jun 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some useless access modifiers in the code
parent
1cd573ee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
20 deletions
+14
-20
app/controllers/import/bitbucket_controller.rb
app/controllers/import/bitbucket_controller.rb
+0
-2
app/controllers/import/gitlab_controller.rb
app/controllers/import/gitlab_controller.rb
+0
-2
app/helpers/diff_helper.rb
app/helpers/diff_helper.rb
+0
-2
app/models/concerns/token_authenticatable.rb
app/models/concerns/token_authenticatable.rb
+14
-14
No files found.
app/controllers/import/bitbucket_controller.rb
View file @
c0ebfea6
...
...
@@ -82,8 +82,6 @@ class Import::BitbucketController < Import::BaseController
go_to_bitbucket_for_permissions
end
private
def
access_params
{
bitbucket_access_token:
session
[
:bitbucket_access_token
],
...
...
app/controllers/import/gitlab_controller.rb
View file @
c0ebfea6
...
...
@@ -61,8 +61,6 @@ class Import::GitlabController < Import::BaseController
go_to_gitlab_for_permissions
end
private
def
access_params
{
gitlab_access_token:
session
[
:gitlab_access_token
]
}
end
...
...
app/helpers/diff_helper.rb
View file @
c0ebfea6
...
...
@@ -142,8 +142,6 @@ module DiffHelper
toggle_whitespace_link
(
url
,
options
)
end
private
def
hide_whitespace?
params
[
:w
]
==
'1'
end
...
...
app/models/concerns/token_authenticatable.rb
View file @
c0ebfea6
module
TokenAuthenticatable
extend
ActiveSupport
::
Concern
private
def
write_new_token
(
token_field
)
new_token
=
generate_token
(
token_field
)
write_attribute
(
token_field
,
new_token
)
end
def
generate_token
(
token_field
)
loop
do
token
=
Devise
.
friendly_token
break
token
unless
self
.
class
.
unscoped
.
find_by
(
token_field
=>
token
)
end
end
class_methods
do
def
authentication_token_fields
@token_fields
||
[]
...
...
@@ -32,18 +46,4 @@ module TokenAuthenticatable
end
end
end
private
def
write_new_token
(
token_field
)
new_token
=
generate_token
(
token_field
)
write_attribute
(
token_field
,
new_token
)
end
def
generate_token
(
token_field
)
loop
do
token
=
Devise
.
friendly_token
break
token
unless
self
.
class
.
unscoped
.
find_by
(
token_field
=>
token
)
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