end
def permission_to_create
- current_user
+ current_user.andand.is_active
end
def ensure_permission_to_update
logger.warn "Anonymous user tried to update #{self.class.to_s} #{self.uuid_was}"
return false
end
+ if !current_user.is_active
+ logger.warn "Inactive user #{current_user.uuid} tried to update #{self.class.to_s} #{self.uuid_was}"
+ return false
+ end
if self.uuid_changed?
logger.warn "User #{current_user.uuid} tried to change uuid of #{self.class.to_s} #{self.uuid_was} to #{self.uuid}"
return false