Sha256: 2227accf0c1a6c578a148d748c4a83c4089edcbf9199bbd7e3428292e02e55df

Contents?: true

Size: 912 Bytes

Versions: 13

Compression:

Stored size: 912 Bytes

Contents

module ErpTechSvcs
  class ErpTechSvcsAuditLog
    class << self

      #log when a user logs out
      def successful_logout(user_id)
        user = User.find(user_id)
        AuditLog.create(
            :party_id => user.party.id,
            :event_record => user,
            :audit_log_type => AuditLogType.find_by_type_and_subtype_iid('application','successful_logout'),
            :description => "User #{user.username} successfully logged out."
        )
      end

      #log when a user logs out
      def successful_login(user)
        AuditLog.create(
            :party_id => user.party.id,
            :event_record => user,
            :audit_log_type => AuditLogType.find_by_type_and_subtype_iid('application','successful_login'),
            :description => "User #{user.username} successfully logged in."
        )
      end

    end #class << self
  end #ErpTechSvcsAuditLog
end #ErpTechSvcs

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
erp_tech_svcs-4.0.0 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.1.8 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.1.7 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.1.5 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.1.4 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.1.3 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.1.2 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.1.1 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.0.12 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.1.0 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.0.11 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.0.10 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb
erp_tech_svcs-3.0.9 lib/erp_tech_svcs/erp_tech_svcs_audit_log.rb