diff options
author | Rémy Coutable <remy@rymai.me> | 2018-07-11 18:53:59 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-07-11 18:53:59 +0200 |
commit | 644135b9c4348dd7d45eaa5684d2c67a8b015b02 (patch) | |
tree | 0474ec0c3b0861214d16f93d6c95fe7a01a8be9c | |
parent | ffba5ce93646eb8e42ceddcec94b6797b3efb471 (diff) | |
download | gitlab-ce-644135b9c4348dd7d45eaa5684d2c67a8b015b02.tar.gz |
Revert "Moving 400 lines of code"
This reverts commit 1915c9f0cf1ec3e836c02ba57c97e5a9a61d487b.
-rw-r--r-- | app/models/project.rb | 301 | ||||
-rw-r--r-- | app/models/user.rb | 27 |
2 files changed, 13 insertions, 315 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 2cc0c83d064..770262f6193 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -2182,306 +2182,5 @@ class Project < ActiveRecord::Base else check_access.call end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - end end diff --git a/app/models/user.rb b/app/models/user.rb index 4aeaaedfe4d..1c5d39db118 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -441,20 +441,6 @@ class User < ActiveRecord::Base [:ghost] end - def full_website_url - return "http://#{website_url}" if website_url !~ %r{\Ahttps?://} - - website_url - end - - def short_website_url - website_url.sub(%r{\Ahttps?://}, '') - end - - def all_ssh_keys - keys.map(&:publishable_key) - end - def internal? self.class.internal_attributes.any? { |a| self[a] } end @@ -859,6 +845,19 @@ class User < ActiveRecord::Base project.project_member(self) end + def full_website_url + return "http://#{website_url}" if website_url !~ %r{\Ahttps?://} + + website_url + end + + def short_website_url + website_url.sub(%r{\Ahttps?://}, '') + end + + def all_ssh_keys + keys.map(&:publishable_key) + end def temp_oauth_email? email.start_with?('temp-email-for-oauth') |