Exemple #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
Exemple #2
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
Exemple #3
0
    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
Exemple #4
0
def can_write_foiproject(foiproject, request):
    return can_write_object(foiproject, request)
Exemple #5
0
 def can_write(self, request):
     return can_write_object(self, request=request)
Exemple #6
0
def can_write_foiproject(foiproject, request):
    return can_write_object(foiproject, request)