mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-11 06:35:58 +08:00
Merge pull request #1225 from okriuchykhin/ok_SCI_2534
Fix rendering permissions of inventory annotations [SCI-2534]
This commit is contained in:
commit
f67b8d05c7
2 changed files with 4 additions and 2 deletions
|
|
@ -41,7 +41,8 @@ module SmartAnnotations
|
|||
end
|
||||
|
||||
def repository_item(name, user, type, object)
|
||||
if object && SmartAnnotations::PermissionEval.check(user, type, object)
|
||||
if object
|
||||
return unless SmartAnnotations::PermissionEval.check(user, type, object)
|
||||
return SmartAnnotations::HtmlPreview.html(nil, type, object)
|
||||
end
|
||||
SmartAnnotations::HtmlPreview.html(name, type, object)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ module SmartAnnotations
|
|||
end
|
||||
|
||||
def repository_item(name, user, type, object)
|
||||
if object && SmartAnnotations::PermissionEval.check(user, type, object)
|
||||
if object
|
||||
return unless SmartAnnotations::PermissionEval.check(user, type, object)
|
||||
return SmartAnnotations::TextPreview.text(nil, type, object)
|
||||
end
|
||||
SmartAnnotations::TextPreview.text(name, type, object)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue