Sha256: 4c3ccb42c71104f7bdd810374bdd4822f40d92e43f88b91b2be0cf63259bcbf8
Contents?: true
Size: 793 Bytes
Versions: 16
Compression:
Stored size: 793 Bytes
Contents
module EgovUtils module RegistrationRequests class CheckAutoAccept < ActiveInteraction::Base record :registration_request, class: 'EgovUtils::RegistrationRequest' def execute member = nil EgovUtils::Group.where.not(provider: nil).detect do |g| member = g.ldap_members.detect do |m| m[:login] == registration_request.mail end end return unless member registration_request.update( status: 'accepted', internal_reason: 'Automaticky schválen na základě členství v LDAP skupině' ) EgovUtils::RegistrationRequestMailer .auto_accepted(registration_request.id) .deliver_now registration_request end end end end
Version data entries
16 entries across 16 versions & 1 rubygems