diff --git a/lib/src/kvs/tx.rs b/lib/src/kvs/tx.rs index d0db20ab..6c89cddc 100644 --- a/lib/src/kvs/tx.rs +++ b/lib/src/kvs/tx.rs @@ -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; diff --git a/lib/src/sql/permission.rs b/lib/src/sql/permission.rs index 5c0a06b9..847ba2fc 100644 --- a/lib/src/sql/permission.rs +++ b/lib/src/sql/permission.rs @@ -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,