mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX 解决合并请求的权限问题
This commit is contained in:
@@ -108,6 +108,10 @@ class Organization < Owner
|
||||
team_users.joins(:team).where(user_id: user_id, teams: {authorize: %w(read write admin owner)}).present?
|
||||
end
|
||||
|
||||
def is_only_read?(user_id)
|
||||
team_users.joins(:team).where(user_id: user_id, teams: {authorize: %w(read)}).present?
|
||||
end
|
||||
|
||||
# 是不是所有者团队的最后一个成员
|
||||
def is_owner_team_last_one?(user_id)
|
||||
owner_team_users = team_users.joins(:team).where(teams: {authorize: %w(owner)})
|
||||
|
||||
Reference in New Issue
Block a user