I want to add some team-based features to django-badger. I was hoping that someone had already built a reusable app to do most of the work for me. This happens quite a lot when I’m working with Django. Unfortunately, I haven’t quite found what I’m looking for yet. Consider this blog post either the product of my thinking out loud toward a rough spec, or a long-winded lazyweb search query.

First, what do I mean by a “team”? Well, a familiar example is a guild in World of Warcraft: A group of people with access to shared resources, that access controlled by permissions bundled into ranks assigned to each member of the group.

Guild management in WoW

Guild management in WoW

While Django does come with Users, Groups, & Permissions, the concept of Roles within Groups to which Permissions can be attached seems missing.

If I try to extend the Django building blocks, maybe I could represent a “Team” as a bundle of Groups and treat those Groups as Roles? Or, maybe Groups should just become hierarchical – make it turtles all the way down. (I really like that expression, in case you can’t tell.)

With respect to that last point, I found django-hierarchical-auth. That seems like a good lead. But, I’m having trouble finding other projects using it. There’s feinCMS – I’ve never heard of that before, but that’s more my lack than theirs.

In the case of django-badger, I’d like to enable users to start teams, create badges that belong to the team, and allow other team members varying levels of control over those badges (e.g. creating, editing, awarding, approving nominations, etc).

So, there’s the matter of user interface – I’d like any user (not just site-wide admins) to be able to:

  • create a team;
  • manage team profile information;
  • manage & grant roles based on a canned selection of permissions;
  • invite other users as members, remove members;
  • accept team invitations, request to join a team, remove oneself from a team.

The django-hierarchical-auth app comes with no views; it’s just a backend utility. So, if I grab that app, I’ll still have to build the UI and supporting models myself (i.e. for team profiles and permission sets).

So, that leaves me wondering if there’s some value in me building a reusable app atop django-hierarchical-auth that basically implements what that WoW guild management interface offers? Ultimately, that’s what I’m really hoping someone else has built for me.