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
Léo-Paul Géneau
gitlab-ce
Commits
1915c9f0
Commit
1915c9f0
authored
Jul 10, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving 400 lines of code
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
867018aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
315 additions
and
13 deletions
+315
-13
app/models/project.rb
app/models/project.rb
+301
-0
app/models/user.rb
app/models/user.rb
+14
-13
No files found.
app/models/project.rb
View file @
1915c9f0
...
@@ -2182,5 +2182,306 @@ class Project < ActiveRecord::Base
...
@@ -2182,5 +2182,306 @@ class Project < ActiveRecord::Base
else
else
check_access
.
call
check_access
.
call
end
end
end
end
end
end
app/models/user.rb
View file @
1915c9f0
...
@@ -441,6 +441,20 @@ class User < ActiveRecord::Base
...
@@ -441,6 +441,20 @@ class User < ActiveRecord::Base
[
:ghost
]
[
:ghost
]
end
end
def
full_website_url
return
"http://
#{
website_url
}
"
if
website_url
!~
%r{
\A
https?://}
website_url
end
def
short_website_url
website_url
.
sub
(
%r{
\A
https?://}
,
''
)
end
def
all_ssh_keys
keys
.
map
(
&
:publishable_key
)
end
def
internal?
def
internal?
self
.
class
.
internal_attributes
.
any?
{
|
a
|
self
[
a
]
}
self
.
class
.
internal_attributes
.
any?
{
|
a
|
self
[
a
]
}
end
end
...
@@ -845,19 +859,6 @@ class User < ActiveRecord::Base
...
@@ -845,19 +859,6 @@ class User < ActiveRecord::Base
project
.
project_member
(
self
)
project
.
project_member
(
self
)
end
end
def
full_website_url
return
"http://
#{
website_url
}
"
if
website_url
!~
%r{
\A
https?://}
website_url
end
def
short_website_url
website_url
.
sub
(
%r{
\A
https?://}
,
''
)
end
def
all_ssh_keys
keys
.
map
(
&
:publishable_key
)
end
def
temp_oauth_email?
def
temp_oauth_email?
email
.
start_with?
(
'temp-email-for-oauth'
)
email
.
start_with?
(
'temp-email-for-oauth'
)
...
...
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