Sha256: 3ac9ed94b043fb028dd2cb5648154383deb95ddf68e3c9951dd7a9478a34ec64

Contents?: true

Size: 506 Bytes

Versions: 1

Compression:

Stored size: 506 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['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

1 entries across 1 versions & 1 rubygems

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