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

app/controllers/admin/accounts_controller.rb Outdated Show resolved Hide resolved
app/models/account.rb Outdated Show resolved Hide resolved
@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
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.

@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.

None yet

3 participants