Sha256: ada60bc8fa3a683d23f7bbf6ab3f1a5e004bbb3475adcbd3efe87a36358a210d
Contents?: true
Size: 711 Bytes
Versions: 4
Compression:
Stored size: 711 Bytes
Contents
# frozen_string_literal: true module Maquina class ApplicationPolicy < ActionPolicy::Base def index? false end def show? false end def new? false end def create? new? end def edit? false end def update? edit? end def destroy? false end def new_modal? false end private def management? user.management? end def admin? (Maquina::Current.membership.present? && Maquina::Current.membership.admin?) end relation_scope do |scope| Rails.logger.warn("This policy scope at #{self} is not scoping by User or Organization") scope end end end
Version data entries
4 entries across 4 versions & 1 rubygems