Skip to content

Commit

Permalink
Update app/models/ability.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Truskinger <[email protected]>
  • Loading branch information
andrew-1234 and atruskie authored Feb 6, 2025
1 parent 7006a34 commit bf2675e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,8 @@ def to_verification(user, _is_guest)
verification.audio_event.audio_recording.site.projects
)

# only check creator_id for persisted records (updates)
# anyone with writer access can create a verification,
# but only users who created a verifications can update them (and only if they still have access to the project)
if verification.persisted?
has_writer_access && verification.creator_id == user&.id
else
Expand Down

0 comments on commit bf2675e

Please sign in to comment.