Module: Jabysoft::AuthorisationService

Included in:
LinksHelper
Defined in:
app/services/jabysoft/authorisation_service.rb

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
8
# File 'app/services/jabysoft/authorisation_service.rb', line 3

def authorise_link(action, model:, style:, options:)
  options.reverse_merge!(class: style)
  authorised = link_authorised?(action, model) if model.present?
  options.merge!(class: style + " disabled ") unless authorised
  return yield authorised
end