Commit 17b098ca authored by Sli's avatar Sli
Browse files

Fixed lookup for loged barmen

parent 17b483bd
Pipeline #252 failed with stage
in 16 seconds
......@@ -7,9 +7,14 @@ from club.models import Club
from counter.models import Product, Counter
from accounting.models import ClubAccount, Company
def is_token(request):
return ('counter_token' in request.session.keys() and
request.session['counter_token'] and
class RightManagedLookupChannel(LookupChannel):
def check_auth(self, request):
if not request.user.subscribed:
if not request.user.subscribed and not is_token(request):
raise PermissionDenied
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment