Removed role system
This commit is contained in:
parent
5e86133651
commit
1c524f181f
4 changed files with 5 additions and 49 deletions
|
|
@ -1,4 +0,0 @@
|
|||
pub const PERM_CODES: [&str; 2] = [
|
||||
"modify-blog-posts",
|
||||
"modify-users"
|
||||
];
|
||||
|
|
@ -1,11 +1,3 @@
|
|||
table! {
|
||||
permissions (id) {
|
||||
id -> Uuid,
|
||||
user_id -> Uuid,
|
||||
name -> Varchar,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
refresh_tokens (token) {
|
||||
token -> Bytea,
|
||||
|
|
@ -15,30 +7,19 @@ table! {
|
|||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
security_reports (id) {
|
||||
id -> Uuid,
|
||||
report_time -> Timestamp,
|
||||
report_type -> Varchar,
|
||||
content -> Text,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
users (id) {
|
||||
id -> Uuid,
|
||||
username -> Varchar,
|
||||
password -> Text,
|
||||
blocked -> Bool,
|
||||
admin -> Bool,
|
||||
}
|
||||
}
|
||||
|
||||
joinable!(permissions -> users (user_id));
|
||||
joinable!(refresh_tokens -> users (user_id));
|
||||
|
||||
allow_tables_to_appear_in_same_query!(
|
||||
permissions,
|
||||
refresh_tokens,
|
||||
security_reports,
|
||||
users,
|
||||
);
|
||||
|
|
|
|||
Reference in a new issue