abstract class ApplicationPolicy(T)

Overview

The default Pundit policy that all other policies should inherit from.

Should you with to update the default policy definitions, run lucky pundit.init and override where needed.

Defined in:

pundit/application_policy.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(user : User | Nil, record : T | Nil = nil) #

A policy takes in a user that might be nil, as well as an object that may be nil.

These are available in all policy check methods for access.


[View source]

Instance Method Detail

def create? #

Whether or not the Create action can be accessed


[View source]
def delete? #

Whether or not the Delete action can be accessed


[View source]
def edit? #

Whether or not the Edit action can be accessed


[View source]
def index? #

Whether or not the Index action can be accessed


[View source]
def new? #

Whether or not the New action can be accessed


[View source]
def record #

[View source]
def show? #

Whether or not the Show action can be accessed


[View source]
def update? #

Whether or not the Update action can be accessed


[View source]
def user #

[View source]