mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-30 11:41:19 +08:00
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:
commit
be90881849
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue