Sharing tables readonly with other users

- Added sharing feature for table owners to share their tables with
  other registered users.
- Fixed a bug where the wrong entries would be deleted or modified when
  searching or filtering.
This commit is contained in:
Johannes Randerath
2024-09-01 20:14:31 +02:00
parent c6cb3a48bc
commit 61708e5199
22 changed files with 766 additions and 167 deletions

View File

@@ -0,0 +1 @@
DROP TABLE shares;

View File

@@ -0,0 +1,13 @@
CREATE TABLE shares (
id INTEGER AUTO_INCREMENT UNIQUE NOT NULL,
PRIMARY KEY(id),
sharee_id INTEGER NOT NULL,
FOREIGN KEY (sharee_id) REFERENCES users(id)
ON DELETE CASCADE
ON UPDATE CASCADE,
tblid INTEGER NOT NULL,
FOREIGN KEY (tblid) REFERENCES jrtables(id)
ON DELETE CASCADE
ON UPDATE CASCADE,
readonly BOOLEAN NOT NULL DEFAULT true
);