Sha256: eda298cdf2fd1ed7e7bdfdf6983c59d90ed51899f8947389e0155785a7151714

Contents?: true

Size: 419 Bytes

Versions: 3

Compression:

Stored size: 419 Bytes

Contents

class ExampleController < ApplicationController
  before_action :authenticate_user!, except: :not_restricted
  before_action -> { authorise_user!("execute") }, only: :this_requires_execute_permission

  def not_restricted
    render body: "jabberwocky"
  end

  def restricted
    render body: "restricted kablooie"
  end

  def this_requires_execute_permission
    render body: "you have execute permission"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gds-sso-19.0.0 spec/internal/app/controllers/example_controller.rb
gds-sso-18.1.0 spec/internal/app/controllers/example_controller.rb
gds-sso-18.0.0 spec/internal/app/controllers/example_controller.rb