Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index dea34e812ca..8638c5a9c53 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -51,6 +51,7 @@ class Namespace < ApplicationRecord
validate :nesting_level_allowed
delegate :name, to: :owner, allow_nil: true, prefix: true
+ delegate :avatar_url, to: :owner, allow_nil: true
after_commit :refresh_access_of_projects_invited_groups, on: :update, if: -> { previous_changes.key?('share_with_group_lock') }
@@ -149,6 +150,10 @@ class Namespace < ApplicationRecord
type == 'Group' ? 'group' : 'user'
end
+ def user?
+ kind == 'user'
+ end
+
def find_fork_of(project)
return unless project.fork_network