Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix admins being able to suspend their instance actor #14567

Merged
merged 4 commits into from
Dec 15, 2020

Conversation

ClearlyClaire
Copy link
Contributor

I'm not sure how, but I've seen a couple admins manage to suspend their instance actor (which cause federation issues).

This PR:

  • makes Account#suspend! do nothing on the instance actor
  • makes Account#suspend? return false no matter what on the instance actor
  • makes a flash appear on the admin interface to reduce confusion

image

@ClearlyClaire ClearlyClaire force-pushed the fixes/suspended-instance-actor branch from be81b8b to 6c0ffb4 Compare August 12, 2020 15:01
app/controllers/admin/accounts_controller.rb Outdated Show resolved Hide resolved
app/models/account.rb Outdated Show resolved Hide resolved
@ClearlyClaire ClearlyClaire force-pushed the fixes/suspended-instance-actor branch from 6f83370 to 4b4ca8a Compare August 24, 2020 12:19
@ClearlyClaire ClearlyClaire requested a review from Gargron August 24, 2020 13:24
@ClearlyClaire
Copy link
Contributor Author

ping @Gargron

@Gargron
Copy link
Member

Gargron commented Sep 28, 2020

Back-end changes are good but what if instead of adding a flash message which made this account not show up in accounts list, make its name unclickable in places where it appears, and made it impossible to view its account page?

@ClearlyClaire
Copy link
Contributor Author

hm… it's possibly a lot of places, though…

@ClearlyClaire ClearlyClaire force-pushed the fixes/suspended-instance-actor branch from 4b4ca8a to c744fd5 Compare September 30, 2020 16:58
@ClearlyClaire
Copy link
Contributor Author

Rebased and made it so the instance actor doesn't show up in the accounts list in moderation view. It could show up in other parts but I think that's fine. Kept the flash message in case someone stumbles upon it.

@ClearlyClaire ClearlyClaire force-pushed the fixes/suspended-instance-actor branch from c744fd5 to 9ae10ae Compare September 30, 2020 17:13
@ClearlyClaire ClearlyClaire force-pushed the fixes/suspended-instance-actor branch from 9ae10ae to 089368c Compare December 15, 2020 15:56
@Gargron Gargron merged commit 8357969 into mastodon:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants