Make DEFINE TABLE and DEFINE FIELD permissions FULL by default

This commit is contained in:
Tobie Morgan Hitchcock 2022-04-04 19:51:37 +01:00
parent 1d66a4772d
commit 2b7a23c569
2 changed files with 7 additions and 3 deletions

View file

@ -143,7 +143,7 @@ pub enum Permission {
impl Default for Permission { impl Default for Permission {
fn default() -> Self { fn default() -> Self {
Permission::None Permission::Full
} }
} }

View file

@ -622,7 +622,9 @@ impl fmt::Display for DefineTableStatement {
if let Some(ref v) = self.view { if let Some(ref v) = self.view {
write!(f, " {}", v)? write!(f, " {}", v)?
} }
write!(f, " {}", self.permissions)?; if !self.permissions.is_full() {
write!(f, " {}", self.permissions)?;
}
Ok(()) Ok(())
} }
} }
@ -840,7 +842,9 @@ impl fmt::Display for DefineFieldStatement {
if let Some(ref v) = self.assert { if let Some(ref v) = self.assert {
write!(f, " ASSERT {}", v)? write!(f, " ASSERT {}", v)?
} }
write!(f, " {}", self.permissions)?; if !self.permissions.is_full() {
write!(f, " {}", self.permissions)?;
}
Ok(()) Ok(())
} }
} }