I think this might be better in permissions.py, with the rest of the permissions code.  I personally think that code is pretty ugly and could use some work, but the one good thing is that it's all in 1 place.