Update collab permission tests and minor fixes

This commit is contained in:
thiloho
2024-09-06 16:08:34 +02:00
parent a77d2b2d0c
commit b8d23eab00
16 changed files with 804 additions and 610 deletions

View File

@@ -84,3 +84,7 @@ FROM
ALTER TABLE internal.website
DROP COLUMN title_search;
GRANT SELECT, UPDATE, DELETE ON api.website TO authenticated_user;
GRANT SELECT, INSERT, UPDATE, DELETE ON api.article TO authenticated_user;

View File

@@ -103,6 +103,8 @@ SELECT
FROM
internal.article;
GRANT SELECT, INSERT, UPDATE, DELETE ON api.article TO authenticated_user;
DROP VIEW api.docs_category;
ALTER TABLE internal.article

View File

@@ -104,3 +104,5 @@ FROM
JOIN internal.home ho ON w.id = ho.website_id
JOIN internal.footer f ON w.id = f.website_id;
GRANT SELECT ON api.website_overview TO authenticated_user;

View File

@@ -52,3 +52,5 @@ FROM
ALTER TABLE internal.article
DROP COLUMN article_weight;
GRANT SELECT, INSERT, UPDATE, DELETE ON api.article TO authenticated_user;

View File

@@ -136,3 +136,5 @@ FROM
JOIN internal.home ho ON w.id = ho.website_id
JOIN internal.footer f ON w.id = f.website_id;
GRANT SELECT ON api.website_overview TO authenticated_user;

View File

@@ -136,3 +136,5 @@ FROM
JOIN internal.home ho ON w.id = ho.website_id
JOIN internal.footer f ON w.id = f.website_id;
GRANT SELECT ON api.website_overview TO authenticated_user;

View File

@@ -3,6 +3,13 @@ ALTER TABLE internal.article
ALTER COLUMN publication_date DROP NOT NULL;
-- migrate:down
UPDATE
internal.article
SET
publication_date = CURRENT_DATE
WHERE
publication_date IS NULL;
ALTER TABLE internal.article
ALTER COLUMN publication_date SET NOT NULL;

View File

@@ -33,3 +33,5 @@ SELECT
FROM
internal.website;
GRANT SELECT, UPDATE, DELETE ON api.website TO authenticated_user;