forked from CGM_Public/pretix_original
* Install django-scopes * Fix tests.api * Update tasks and cronjobs * Fix remaining tests * Remove unused import * Fix tests after rebase * Disable scopes for get_Events_with_any_permission * Disable scopes for a management command
11 lines
265 B
Python
11 lines
265 B
Python
from django_scopes import scope
|
|
|
|
|
|
def classscope(attr='o'):
|
|
def wrap(fn):
|
|
def wrapped(self, *args, **kwargs):
|
|
with scope(organizer=getattr(self, attr)):
|
|
return fn(self, *args, **kwargs)
|
|
return wrapped
|
|
return wrap
|