#733 open
Betelgeuse

Permission exemption check doesn't reach childs

Reported by Betelgeuse | May 30th, 2010 @ 11:18 PM | in Hobo 1.4

Situation:

  • You build child records with o.childs.build inside a transition
  • You call save on the parent

What happens:

  • permissions are fired

Looking at Hobo code there's:

    def permission_check_required?
      # Lifecycle steps are exempt from permission checks
      acting_user && !(self.class.has_lifecycle? && lifecycle.active_step)
    end

This leads me to believe that they should not be fired for the child record either. acting_user is set in the child but the child has no lifecycles in my case.

(rdb:1) p acting_user && !(self.class.has_lifecycle? && lifecycle.active_step)
true
(rdb:1) p self.class.has_lifecycle?
nil

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Referenced by

Pages