Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
d7595adb
Unverified
Commit
d7595adb
authored
2 years ago
by
Eugen Rochko
Committed by
GitHub
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Add `--remove-role` option to `tootctl accounts modify` (#19477)
Fix #19152
parent
3e18e053
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/mastodon/accounts_cli.rb
+5
-1
lib/mastodon/accounts_cli.rb
with
5 additions
and
1 deletion
+5
-1
lib/mastodon/accounts_cli.rb
+
5
-
1
View file @
d7595adb
...
...
@@ -126,6 +126,7 @@ module Mastodon
end
option
:role
option
:remove_role
,
type: :boolean
option
:email
option
:confirm
,
type: :boolean
option
:enable
,
type: :boolean
...
...
@@ -137,7 +138,8 @@ module Mastodon
long_desc
<<-
LONG_DESC
Modify a user account.
With the --role option, update the user's role.
With the --role option, update the user's role. To remove the user's
role, i.e. demote to normal user, use --remove-role.
With the --email option, update the user's e-mail address. With
the --confirm option, mark the user's e-mail as confirmed.
...
...
@@ -171,6 +173,8 @@ module Mastodon
end
user
.
role_id
=
role
.
id
elsif
options
[
:remove_role
]
user
.
role_id
=
nil
end
password
=
SecureRandom
.
hex
if
options
[
:reset_password
]
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment