Skip to content

Commit 0e59ce6

Browse files
committed
観客の権限を更新した
1 parent bbd0fdc commit 0e59ce6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/app/models/concerns/readable.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ def readable_records(team:)
8181
return all if %w[Category Problem].include?(klass)
8282

8383
# 見学者なら一部のテーブルを除き全レコード取得可能
84-
return all if team.audience? && all_models(ignore: %w[Attachment Config Notice ProblemEnvironment]).include?(klass)
84+
return all if team.audience? && %w[Category Problem ProblemBody ProblemSupplement Team].include?(klass)
85+
return where(team: [nil]) if team.audience? && %w[Notice].include?(klass)
8586

8687
case klass
8788
when 'Answer'

0 commit comments

Comments
 (0)