Sha256: cda1ac5e4d234bdc1aa7008423406f48007ae57e461531aaeb7c994bef3ffb03
Contents?: true
Size: 443 Bytes
Versions: 39
Compression:
Stored size: 443 Bytes
Contents
class CarrierTypePolicy < ApplicationPolicy def index? true if user.try(:has_role?, 'Librarian') end def show? true if user.try(:has_role?, 'Librarian') end def create? true if user.try(:has_role?, 'Administrator') end def update? true if user.try(:has_role?, 'Administrator') end def destroy? if user.try(:has_role?, 'Administrator') true unless record.manifestations.exists? end end end
Version data entries
39 entries across 38 versions & 2 rubygems