KryptedGaming / krypted

Community management platform by Krypted Gaming.
https://auth.kryptedgaming.com/
MIT License
8 stars 8 forks source link

Create a State system #250

Closed porowns closed 4 years ago

porowns commented 5 years ago

Instead of doing a ton of weird things with groups, I'd like to have a state system similar to that of AllianceAuth.

Back in the early days, we had the Guild system, which was a more primitive state system that allowed guild managers to add people to their guilds, and then players could join and request groups within a guild. This was replaced by group dependency lists later on because the guild system seemed forced, but ultimately it was the best solution and we need to move towards it again.

Basically, we need State objects that act as buckets of groups. A Guest may be able to see guest groups, while an EVE Online state might be able to see EVE Online groups. This will allow us to put people in states based on certain conditions- for example EVE Online corporations or applications.

From there, I think we should be able to extend state objects like EveStateObject, which will create a state object but also let us extend them with the corporations/etc.

porowns commented 5 years ago

@Czahrien do you think you could do a proof of concept of a State model with an EveStateModel extending it? This way we could see if it's the right way forward... Ideally I'd like to keep the state separate from entities like EVE corporations

porowns commented 5 years ago

I think a more simple implementation would be the following:

States have:

Then there would be two tasks:

And one signal:

We would need a "Groups" view after this that allows users to:

To solve the EVE Online bit, we would just need to make a django-eveonline-groups extension and have it auto-add users to groups, so you'd just create a task that adds users to a group based on their character, corporation, or alliance. This would put trigger the state signal and re-assess their state.

porowns commented 5 years ago

Group requests might just be better suited for a separate package, but they could be here as well.. not sure.

porowns commented 4 years ago

https://github.com/KryptedGaming/django-eveonline-group-states