Default TABLE permissions are now NONE not FULL
This commit is contained in:
parent
a2c5ea237b
commit
6d36aa0b2c
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue