Sha256: 95dd92d460bf53f8d251397f5b0f7e96eb5ad6f9ed5bc5b77d843471e6bcc2f8
Contents?: true
Size: 430 Bytes
Versions: 29
Compression:
Stored size: 430 Bytes
Contents
class CheckoutTypePolicy < 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 if record.items.empty? end end end
Version data entries
29 entries across 29 versions & 1 rubygems