Sha256: 5fe589ad7d4d9069eb9b8b82a3d435aa3ff4acd765399931d8eff8b852d8c439
Contents?: true
Size: 482 Bytes
Versions: 10
Compression:
Stored size: 482 Bytes
Contents
module Storytime class SitePolicy attr_reader :user, :site def initialize(user, site) @user = user @site = site end def manage? action = Storytime::Action.find_by(guid: "47342a") @user.storytime_role.present? && @user.storytime_role.allowed_actions.include?(action) end def create? !Site.any? end def new? create? end def update? manage? end def edit? update? end end end
Version data entries
10 entries across 10 versions & 1 rubygems