mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-07 19:18:34 +03:00
@@ -80,6 +80,18 @@ def check_sheet_write_access(
|
||||
if resp.status_code == 404:
|
||||
return False
|
||||
if resp.status_code == 403:
|
||||
# Distinguish "API not enabled" from "no access to sheet"
|
||||
try:
|
||||
error_details = resp.json().get("error", {})
|
||||
for detail in error_details.get("details", []):
|
||||
if detail.get("reason") == "SERVICE_DISABLED":
|
||||
logger.warning(
|
||||
f"Google Drive API is not enabled for this project."
|
||||
f"Contact an admin to enable it at: {detail.get('metadata', {}).get('activationUrl', 'N/A')}"
|
||||
)
|
||||
return None
|
||||
except Exception:
|
||||
pass
|
||||
return False
|
||||
if resp.status_code == 200:
|
||||
return resp.json().get("capabilities", {}).get("canEdit", False)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION = "0.12.13"
|
||||
VERSION = "0.12.14"
|
||||
|
||||
API_DESCRIPTION = """
|
||||
#### API for the Auto-Archiver project, a tool to archive web pages and Google Sheets.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# From python:3.10
|
||||
FROM bellingcat/auto-archiver:v1.2.5
|
||||
FROM bellingcat/auto-archiver:v1.2.6
|
||||
# NOTE: remove dot from v.1, this release was badly named
|
||||
|
||||
# set work directory
|
||||
|
||||
1418
poetry.lock
generated
1418
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ requires-python = ">=3.10,<3.13"
|
||||
|
||||
|
||||
dependencies = [
|
||||
"auto-archiver (>=1.2.5,<2.0.0)",
|
||||
"auto-archiver (>=1.2.6,<2.0.0)",
|
||||
"celery (>=5.0)",
|
||||
"redis (>=7.2.0,<8.0.0)",
|
||||
"loguru (>=0.7.3,<0.8.0)",
|
||||
|
||||
Reference in New Issue
Block a user