Module: Card::View::Permission

Included in:
Card::View
Defined in:
card/lib/card/view/permission.rb

Overview

View permissions support view-specific permission handling

Views can be configured in view definitions with the perms directive, eg

    # only render if user has permission to update card
    view :myview, perms: :update do...

Constant Summary collapse

CRUD =
::Set.new(%i[create read update delete]).freeze

Instance Method Summary collapse

Instance Method Details

#view_permsObject



13
14
15
# File 'card/lib/card/view/permission.rb', line 13

def view_perms
  @view_perms = setting(:perms) || :read
end