database work for permissions
parent
b6cff1d7b2
commit
89311c65b0
|
@ -19,6 +19,24 @@ CREATE TABLE threads (
|
||||||
foreign key(creator) references users(id)
|
foreign key(creator) references users(id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE permissions (
|
||||||
|
thread integer,
|
||||||
|
user integer,
|
||||||
|
type text,
|
||||||
|
flexible boolean,
|
||||||
|
permission text,
|
||||||
|
value text,
|
||||||
|
foreign key(user) references users(id),
|
||||||
|
foreign key(thread) references threads(id)
|
||||||
|
)
|
||||||
|
|
||||||
|
CREATE TABLE members (
|
||||||
|
thread integer,
|
||||||
|
user integer,
|
||||||
|
foreign key(user) references users(id),
|
||||||
|
foreign key(thread) references threads(id)
|
||||||
|
)
|
||||||
|
|
||||||
CREATE TABLE posts (
|
CREATE TABLE posts (
|
||||||
id integer primary key asc,
|
id integer primary key asc,
|
||||||
user integer,
|
user integer,
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
# notes on db fields
|
||||||
|
|
||||||
|
## permissions -> type
|
||||||
|
|
||||||
|
- user
|
||||||
|
- members
|
||||||
|
- everyone
|
||||||
|
|
||||||
|
## permissions -> permission
|
||||||
|
|
||||||
|
- manage_permissions
|
||||||
|
- add_users
|
||||||
|
- remove_users
|
||||||
|
- view
|
||||||
|
- post
|
||||||
|
|
||||||
|
## permissions -> value
|
||||||
|
|
||||||
|
for now just `true` or `false`
|
||||||
|
|
||||||
|
but leaving this open for the future if needed
|
Loading…
Reference in New Issue