Default TABLE permissions are now NONE not FULL

This commit is contained in:
Tobie Morgan Hitchcock 2022-07-26 17:04:53 +01:00
parent a2c5ea237b
commit 6d36aa0b2c
2 changed files with 4 additions and 2 deletions

View file

@ -7,6 +7,7 @@ use crate::key::thing;
use crate::sql;
use crate::sql::thing::Thing;
use channel::Sender;
use sql::permission::Permissions;
use sql::statements::DefineDatabaseStatement;
use sql::statements::DefineEventStatement;
use sql::statements::DefineFieldStatement;
@ -741,6 +742,7 @@ impl Transaction {
let key = crate::key::tb::new(ns, db, tb);
let val = DefineTableStatement {
name: tb.to_owned().into(),
permissions: Permissions::none(),
..DefineTableStatement::default()
};
let _ = self.put(key, &val).await;

View file

@ -19,7 +19,7 @@ pub struct Permissions {
}
impl Permissions {
fn none() -> Self {
pub fn none() -> Self {
Permissions {
select: Permission::None,
create: Permission::None,
@ -28,7 +28,7 @@ impl Permissions {
}
}
fn full() -> Self {
pub fn full() -> Self {
Permissions {
select: Permission::Full,
create: Permission::Full,