mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
Merge branch 'standalone_develop' into pm_project_develop
This commit is contained in:
@@ -216,4 +216,9 @@ class Organization < Owner
|
||||
ids.uniq.size
|
||||
end
|
||||
|
||||
# user容错处理
|
||||
def get_letter_avatar_url
|
||||
""
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -182,14 +182,14 @@ class Project < ApplicationRecord
|
||||
end
|
||||
if changes[:is_public].present?
|
||||
if changes[:is_public][0] && !changes[:is_public][1]
|
||||
CacheAsyncClearJob.perform_later('project_rank_service', self.id)
|
||||
CacheAsyncClearJob.set(wait: 5.seconds).perform_later('project_rank_service', self.id)
|
||||
end
|
||||
if !changes[:is_public][0] && changes[:is_public][1]
|
||||
$redis_cache.srem("v2-project-rank-deleted", self.id)
|
||||
end
|
||||
end
|
||||
if !self.common?
|
||||
CacheAsyncClearJob.perform_later('project_rank_service', self.id)
|
||||
CacheAsyncClearJob.set(wait: 5.seconds).perform_later('project_rank_service', self.id)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -458,6 +458,10 @@ class Project < ApplicationRecord
|
||||
$redis_cache.hdel("issue_cache_delete_count", self.id)
|
||||
end
|
||||
|
||||
def open_portrait
|
||||
EduSetting.get("open_portrait_projects").present? ? EduSetting.get("open_portrait_projects").split(",").include?(self.id.to_s) : false
|
||||
end
|
||||
|
||||
def self.mindspore_contributors
|
||||
cache_result = $redis_cache.get("ProjectMindsporeContributors")
|
||||
if cache_result.nil?
|
||||
|
||||
@@ -833,7 +833,11 @@ class User < Owner
|
||||
end
|
||||
|
||||
def admin_or_business?
|
||||
admin? || business?
|
||||
admin? || business?
|
||||
end
|
||||
|
||||
def admin_or_glcc_admin?
|
||||
admin? || glcc_admin?
|
||||
end
|
||||
|
||||
def self.generate_login(prefix)
|
||||
|
||||
Reference in New Issue
Block a user