Merge pull request #1665 from jbargu/jg_sci_2949_3318

Disable editing of office file in view mode when module is locked [SCI-2949, 3318]
This commit is contained in:
Jure Grabnar 2019-04-12 13:00:18 +02:00 committed by GitHub
commit be90881849
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -325,7 +325,7 @@ class WopiController < ActionController::Base
@breadcrumb_folder_url = @close_url
elsif @assoc.class == RepositoryCell
@can_read = can_read_team?(@team)
@can_write = can_manage_repository_rows?(@team)
@can_write = can_edit_wopi_file_in_repository_rows?
@close_url = repository_url(@repository,
only_path: false,
@ -364,4 +364,9 @@ class WopiController < ActionController::Base
logger.warn 'WOPI: proof verification: failed; ' + e.message
render body: nil, status: 500 and return
end
# Overwrriten in electronic signature for locked inventory items
def can_edit_wopi_file_in_repository_rows?
can_manage_repository_rows?(@team)
end
end