Show/hide duplicate button on team permission change in protocol template repository [SCI-8150] (#5190)

This commit is contained in:
ajugo 2023-03-24 11:52:48 +01:00 committed by GitHub
parent 00191e41de
commit 2734c86ef5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -899,7 +899,7 @@ class ProtocolsController < ApplicationController
end
def permissions
if stale?(@protocol)
if stale?([@protocol, @protocol.team.user_assignments])
render json: {
copyable: can_clone_protocol_in_repository?(@protocol),
archivable: can_archive_protocol_in_repository?(@protocol),