PonyConf/accounts/mixins.py
Guilhem Saurel d9b3846cf1 Various Stuffs
- unified orga forms
- unified staff / orga | util / mixin / filter
- moved a signal into its signals.py
- profile edition now edits User / Profile / Participation
- topic can be edited
- orga can set topics reviewers
- removed view list-talks-by-speaker (his talks appears on his page)
- everybody can see topics (template show more stuff the more permissions you have)
2016-07-05 01:16:33 +02:00

14 lines
357 B
Python

from django.contrib.auth.mixins import UserPassesTestMixin
from .utils import is_orga, is_staff
class OrgaRequiredMixin(UserPassesTestMixin):
def test_func(self):
return is_orga(self.request, self.request.user)
class StaffRequiredMixin(UserPassesTestMixin):
def test_func(self):
return is_staff(self.request, self.request.user)