Beispiel #1
0
    def get_object(self):
        if self.request.method == 'DELETE':
            Permission.check_user_permissions(
                permissions=(permission_staging_file_delete, ),
                user=self.request.user)

        staging_folder = get_object_or_404(klass=StagingFolderSource,
                                           pk=self.kwargs['staging_folder_pk'])
        return staging_folder.get_file(
            encoded_filename=self.kwargs['encoded_filename'])
Beispiel #2
0
 def permission_check(user):
     return Permission.check_user_permissions(
         permissions=(permission_users_impersonate, ), user=user)