예제 #1
0
def can_write_foirequest(foirequest, request):
    if can_write_object(foirequest, request):
        return True

    if foirequest.project:
        return can_write_foiproject(foirequest.project, request)
    return False
예제 #2
0
파일: auth.py 프로젝트: stefanw/froide
def can_write_foirequest(foirequest, request):
    if can_write_object(foirequest, request):
        return True

    if foirequest.project:
        return can_write_foiproject(foirequest.project, request)
    return False
예제 #3
0
파일: api_views.py 프로젝트: infoaed/froide
    def has_object_permission(self, request, view, obj):
        if can_write_object(obj, request):
            return True
        if request.method in permissions.SAFE_METHODS and hasattr(obj, 'public'):
            return obj.public

        return False
예제 #4
0
def can_write_foiproject(foiproject, request):
    return can_write_object(foiproject, request)
예제 #5
0
 def can_write(self, request):
     return can_write_object(self, request=request)
예제 #6
0
파일: auth.py 프로젝트: stefanw/froide
def can_write_foiproject(foiproject, request):
    return can_write_object(foiproject, request)