Sha256: 309040bac10497fe20a554912a7b120db4dfea455f6768ee6f3c4383f5457080

Contents?: true

Size: 498 Bytes

Versions: 2

Compression:

Stored size: 498 Bytes

Contents

module KatelloForemanEngine
  module Actions
    class UserDestroy < Dynflow::Action

      def self.subscribe
        Headpin::Actions::UserDestroy
      end

      def plan(user)
        if foreman_user = Bindings.user_find(input['username'])
          plan_self 'foreman_user_id' => foreman_user['id']
        end
      end

      input_format do
        param :foreman_user_id, String
      end

      def run
        Bindings.user_destroy(input['foreman_user_id'])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
katello-foreman-engine-0.0.3 lib/katello_foreman_engine/actions/user_destroy.rb
katello-foreman-engine-0.0.2 lib/katello_foreman_engine/actions/user_destroy.rb