module Dunlop::AuthorizationHelper
  def has_permission_of_type(type, user = current_user)
    ::Dunlop::Ability.has_permission_of_type(type, user)
  end

  # - if any_permission_starts_with 'source-file'
  # NOTE: always true for admin users
  def any_permission_starts_with(expression, user = current_user)
    ::Dunlop::Ability.any_permission_starts_with(expression, user)
  end
end
