The `GroupManager` constructor ensures the structure of the `GroupList`
table, and if the table is newly-created, then some initial data is
seeded.
We previously used the names `default` to represent the group that
accounts are defaultly registered to, and `guest` to represent players
that have not logged in yet. We now instead refer to the group names
specified by the config (`DefaultRegistrationGroupName` and
`DefaultGuestGroupName` respectively)
- GroupManager now validates core groups in the constructor.
- EnsureCoreGroupsPresent -> AssertCoreGroupsPresent.
- Fix indentiation in some places.
- Clarify the intent of this PR in CHANGELOG.md.
- Server will no longer start up when the guest or default groups cannot
be located.
- Players joining with unknown groups assigned to them will be
disconnected with an error
The default guest group is critical and shouldn't be removed without
either TShock doing something like automatically recreating it if it
doesn't exist, or not having a huge problem if it doesn't exist.
I chose to take the easiest path, preventing users from removing it. In
theory the message gives enough context to imply "okay, go change the
group now."
This should be a relatively small edge case but I wanted to resolve it
while I was here.
Add new journey mode research perm and move all existing journey perms from owner to trustedadmin. Also added pylon tp to default and added /spawn perm to admin.
I know, this is not something important, but I'm going through the new packets one by one and adding events developers can work with, patching exploits, and thought this could be a core permission.
Run /sync if your doors disappear. This will resync your local client
with the server state. For more information, please see the associated
changelog entry.
If there's one thing I learned in this exercise, it's that letting
people add random python scripts to the repo like gpltext.py that
promise to be easier than find and replace is a bad idea.
/su elevates you to superadmin for 10 minutes.
Account creation instructions tell you to use the "owner" group.
If you fail to run a command but have the su permission, you're told
that you can override it.
Fixes#1505
As pointed out by @hakusaro, in order to prevent any damage during the process all database calls need to be done in a transaction. Transactions allow us to rollback from a pending state in case something goes wrong.