File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change
1
+ module HammerCLIForeman
2
+ class RegistrationTokens < HammerCLIForeman ::Command
3
+ resource :registration_tokens
4
+ command_name 'registration-tokens'
5
+ desc _ ( 'Manage registration tokens' )
6
+
7
+ class InvalidateMultipleCommand < HammerCLIForeman ::DeleteCommand
8
+ action :invalidate_jwt_tokens
9
+ command_name 'invalidate-multiple'
10
+ success_message _ ( 'Successfully invalidated registration tokens for %{users}.' )
11
+ failure_message _ ( 'Could not invalidate registration tokens' )
12
+
13
+ build_options
14
+ end
15
+
16
+ class InvalidateCommand < HammerCLIForeman ::DeleteCommand
17
+ action :invalidate_jwt
18
+ command_name 'invalidate'
19
+ success_message _ ( 'Successfully invalidated registration tokens for %{user}.' )
20
+ failure_message _ ( 'Could not invalidate registration tokens' )
21
+
22
+ build_options
23
+ end
24
+
25
+ autoload_subcommands
26
+ end
27
+ end
Original file line number Diff line number Diff line change @@ -93,7 +93,8 @@ class DeleteCommand < HammerCLIForeman::DeleteCommand
93
93
lazy_subcommand ( 'table-preference' , _ ( "Managing table preferences" ) ,
94
94
'HammerCLIForeman::TablePreference' , 'hammer_cli_foreman/table_preference'
95
95
)
96
+ lazy_subcommand ( 'registration-tokens' , _ ( "Managing registration tokens" ) ,
97
+ 'HammerCLIForeman::RegistrationTokens' , 'hammer_cli_foreman/registration_tokens' )
96
98
autoload_subcommands
97
99
end
98
-
99
100
end
You can’t perform that action at this time.
0 commit comments