Sha256: 0005d391769954af2abcb07cc13ccb799861dde79b27cdff5ac2b14f065a48c1
Contents?: true
Size: 517 Bytes
Versions: 6
Compression:
Stored size: 517 Bytes
Contents
# frozen_string_literal: true # Policy for Role model class RolePolicy < ControllerPolicy attr_reader :user, :objects def initialize(user, objects) @user = user @objects = objects end def clone? false end def add_permissions? keppler_admin? || user_can?(@objects, 'add_permissions') end def create_permissions? keppler_admin? || user_can?(@objects, 'create_permissions') end def show_description? keppler_admin? || user_can?(@objects, 'create_permissions') end end
Version data entries
6 entries across 6 versions & 1 rubygems