user permissions

This commit is contained in:
2025-07-19 13:38:58 +02:00
parent ec8e73507c
commit 496d5bdb2b
30 changed files with 1384 additions and 195 deletions

View File

@@ -0,0 +1,11 @@
CREATE TABLE user_warrens (
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
warren_id UUID NOT NULL REFERENCES warrens(id) ON DELETE CASCADE,
can_create_children BOOLEAN NOT NULL,
can_list_files BOOLEAN NOT NULL,
can_read_files BOOLEAN NOT NULL,
can_modify_files BOOLEAN NOT NULL,
can_delete_files BOOLEAN NOT NULL,
can_delete_warren BOOLEAN NOT NULL,
PRIMARY KEY(user_id, warren_id)
);