Sha256: c544587770ac129c48fb9a82cfcab6f5c07a40cc1ecedde79677fd0a721b8b9c
Contents?: true
Size: 518 Bytes
Versions: 8
Compression:
Stored size: 518 Bytes
Contents
class UserPolicy attr_reader :current_user, :user def initialize(current_user, user) @current_user = current_user @user = user end def manage? action = Storytime::Action.find_by(guid: "1f7d47") role = @current_user.storytime_role_in_site(Storytime::Site.current) role.present? && role.allowed_actions.include?(action) end def index? manage? end def edit? manage? end def update? manage? end def new? manage? end def create? manage? end end
Version data entries
8 entries across 8 versions & 1 rubygems