equal
deleted
inserted
replaced
678 |
678 |
679 # Perform the access check |
679 # Perform the access check |
680 checkAccess(access_type, request, rights=params['rights']) |
680 checkAccess(access_type, request, rights=params['rights']) |
681 |
681 |
682 |
682 |
|
683 def checkHasPickGetArgs(request, arg, kwargs): |
|
684 """Raises an alternate HTTP response if the request misses get args |
|
685 |
|
686 Args: |
|
687 request: a Django HTTP request |
|
688 |
|
689 Raises: |
|
690 AccessViolationResponse: |
|
691 * if continue is not in request.GET |
|
692 * if field is not in request.GET |
|
693 """ |
|
694 |
|
695 get_args = request.GET |
|
696 |
|
697 if 'continue' in get_args and 'field' in get_args: |
|
698 return |
|
699 |
|
700 #TODO(SRabbelier) inform user that return_url and field are required |
|
701 deny(request, arg, kwargs) |
|
702 |
|
703 |
683 def checkIsDocumentPublic(request, args, kwargs): |
704 def checkIsDocumentPublic(request, args, kwargs): |
684 """Checks whether a document is public. |
705 """Checks whether a document is public. |
685 |
706 |
686 Args: |
707 Args: |
687 request: a Django HTTP request |
708 request: a Django HTTP request |