TShock
TShock copied to clipboard
Reimplementing Permissions
Discussion has been underway about reimplementing the permissions system in TShock.
Based on feedback, the following requirements should be met:
- Users can be added to multiple groups
- Groups must be able to have at least 1 parent
- The change should minimise disruption to current servers as much as possible
- The module should be extensible
As such, I propose the following:
- Users can have 0..* groups
- Groups can have 0..* parents
- Upgrade scripts are provided upon completion, before release, to allow migration to the new schema
- We provide an interface or base class that is overridable to provide whatever functionality is desired
Things to consider (edited as thoughts occur):
- How will prefixes/suffixes be decided?
- Group priorities?
- How will negations & the like be decided?
- Group priorities?
Groups could have priorities much like OTAPI hooks do. Higher priority = negations in this group overturn grants in other active groups, and grants in this group overturn negations in other active groups. This would also solve the problem of chat tags (only the chat formatting rules of the group with the highest priority are applied).