mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-06 05:04:35 +08:00
change method name
This commit is contained in:
parent
7dfec94ffc
commit
8a156ad91e
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ module SmartAnnotations
|
|||
object = fetch_object(type, value[:object_id])
|
||||
# handle repository_items edge case
|
||||
if type == 'rep_item'
|
||||
sample_or_repository_item(value[:name], user, type, object)
|
||||
repository_item(value[:name], user, type, object)
|
||||
else
|
||||
next unless object && SmartAnnotations::PermissionEval.check(user,
|
||||
type,
|
||||
|
@ -40,7 +40,7 @@ module SmartAnnotations
|
|||
end
|
||||
end
|
||||
|
||||
def sample_or_repository_item(name, user, type, object)
|
||||
def repository_item(name, user, type, object)
|
||||
if object && SmartAnnotations::PermissionEval.check(user, type, object)
|
||||
return SmartAnnotations::Preview.html(nil, type, object)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue