Class: EventImportFilePolicy

Inherits:
ApplicationPolicy
  • Object
show all
Defined in:
app/policies/event_import_file_policy.rb

Instance Method Summary collapse

Instance Method Details

#create?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/policies/event_import_file_policy.rb', line 10

def create?
  user.try(:has_role?, 'Librarian')
end

#destroy?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/policies/event_import_file_policy.rb', line 18

def destroy?
  user.try(:has_role?, 'Librarian')
end

#index?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'app/policies/event_import_file_policy.rb', line 2

def index?
  user.try(:has_role?, 'Librarian')
end

#show?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/policies/event_import_file_policy.rb', line 6

def show?
  user.try(:has_role?, 'Librarian')
end

#update?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/policies/event_import_file_policy.rb', line 14

def update?
  user.try(:has_role?, 'Librarian')
end