better aproach of limiting a view to c-lab group

This commit is contained in:
baccenfutter 2013-11-24 19:01:32 +01:00
parent 745522ab4b
commit 114572dac2
2 changed files with 2 additions and 1 deletions

View file

@ -141,7 +141,7 @@ def gastropin(request):
@login_required
def clabpin(request):
if request.user.groups.filter(name='cey-c-lab').count() == 0:
if not request.user.is_clab_member:
return render(request, 'access_denied.html')
def calculate_clab_hash(pin):