Sha256: fdd9619143efd88d95ea96382c944ccc210a29f4a38f70c2e6d1837523325fe3
Contents?: true
Size: 548 Bytes
Versions: 7
Compression:
Stored size: 548 Bytes
Contents
# frozen_string_literal: true # Ability class for our dummy app. Used by CanCanCan to determine # the appropriate permissions for current_ability class Ability include CanCan::Ability def initialize(_user) # user ||= User.new can :manage, Cookbook::Use can :manage, Recipe can :manage, Ingredient can %i[manage select], Tool can %i[manage select], Ingredient can %i[manage select], Supply # return if user.new_record? # Anonymous Users leave # return unless user.admin? # Non Admin Users leave end end
Version data entries
7 entries across 7 versions & 1 rubygems