summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-11-26 08:09:44 +0100
committerYorhel <git@yorhel.nl>2022-11-29 11:24:03 +0100
commit8eee2d30a544dbb43af6b67dfd662fc458fbef01 (patch)
tree648ad55f81fe470ad5a9e9148534796526510b6d /util
parentee27cc56df80847dca66960064c4622df02fcd76 (diff)
API2: Implement token-based authentication + GET /authinfo
+ update filters and APIs to respect the 'listread' permission.
Diffstat (limited to 'util')
-rw-r--r--util/updates/2022-11-29-api2-tokens.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/updates/2022-11-29-api2-tokens.sql b/util/updates/2022-11-29-api2-tokens.sql
new file mode 100644
index 00000000..f88e9754
--- /dev/null
+++ b/util/updates/2022-11-29-api2-tokens.sql
@@ -0,0 +1,9 @@
+ALTER TYPE session_type ADD VALUE 'api2' AFTER 'api';
+
+ALTER TABLE sessions
+ ADD COLUMN notes text,
+ ADD COLUMN listread boolean NOT NULL DEFAULT false;
+
+\i sql/func.sql
+
+DROP FUNCTION user_isvalidsession(vndbid, bytea, session_type);