Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Privacy
Imprint
Contact
Login methods
Sign in
Toggle navigation
Menu
Open sidebar
projects.thm.de
GitLab
Commits
341c1181
Commit
341c1181
authored
May 20, 2016
by
James Lopez
Browse files
refactor project to include some nicer EE stuff
parent
f26389a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
341c1181
...
@@ -204,7 +204,7 @@ def update_forks_visibility_level
...
@@ -204,7 +204,7 @@ def update_forks_visibility_level
state
:finished
state
:finished
state
:failed
state
:failed
after_transition
any
=>
:finished
,
do: :
clear
_import_
d
at
a
after_transition
any
=>
:finished
,
do: :
reset_cache_and
_import_at
trs
end
end
class
<<
self
class
<<
self
...
@@ -360,7 +360,7 @@ def add_import_job
...
@@ -360,7 +360,7 @@ def add_import_job
end
end
end
end
def
clear
_import_
d
at
a
def
reset_cache_and
_import_at
trs
update
(
import_error:
nil
)
update
(
import_error:
nil
)
ProjectCacheWorker
.
perform_async
(
self
.
id
)
ProjectCacheWorker
.
perform_async
(
self
.
id
)
...
@@ -426,12 +426,7 @@ def import_finished?
...
@@ -426,12 +426,7 @@ def import_finished?
end
end
def
safe_import_url
def
safe_import_url
result
=
URI
.
parse
(
self
.
import_url
)
Gitlab
::
UrlSanitizer
.
new
(
import_url
).
masked_url
result
.
password
=
'*****'
unless
result
.
password
.
nil?
result
.
user
=
'*****'
unless
result
.
user
.
nil?
||
result
.
user
==
"git"
#tokens or other data may be saved as user
result
.
to_s
rescue
self
.
import_url
end
end
def
check_limit
def
check_limit
...
...
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