Merge branch 'sync_develop' into develop
This commit is contained in:
commit
d71272146f
|
@ -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)})
|
||||
|
|
Loading…
Reference in New Issue