|
@ -14,6 +14,9 @@ from .settings import URLPREFIX, IF_EMAIL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def authorize(request, choice, pk): |
|
|
def authorize(request, choice, pk): |
|
|
|
|
|
'''If IF grant a support they click a link in a mail which leads here''' |
|
|
|
|
|
# TODO: write a timestamp which is needed to determine time of next mail |
|
|
|
|
|
|
|
|
if choice in ('BIB', 'ELIT', 'SOFT'): |
|
|
if choice in ('BIB', 'ELIT', 'SOFT'): |
|
|
Library.set_granted(pk,True) |
|
|
Library.set_granted(pk,True) |
|
|
return HttpResponse(f"AUTHORIZED! choice: {choice}, pk: {pk}") |
|
|
return HttpResponse(f"AUTHORIZED! choice: {choice}, pk: {pk}") |
|
@ -22,6 +25,8 @@ def authorize(request, choice, pk): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def deny(request, choice, pk): |
|
|
def deny(request, choice, pk): |
|
|
|
|
|
'''If IF denies a support they click a link in a mail which leads here''' |
|
|
|
|
|
|
|
|
if choice in ('BIB', 'ELIT', 'SOFT'): |
|
|
if choice in ('BIB', 'ELIT', 'SOFT'): |
|
|
Library.set_granted(pk,False) |
|
|
Library.set_granted(pk,False) |
|
|
return HttpResponse(f"DENIED! choice: {choice}, pk: {pk}") |
|
|
return HttpResponse(f"DENIED! choice: {choice}, pk: {pk}") |
|
|