Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix authorization check for CrudCode #431

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/lib/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ pub enum AuthError {
IndexPrivate { named: String },
#[error("Sequence `{named}` is private")]
SequencePrivate { named: String },
#[error("Only the database owner can perform the requested operation")]
OwnerRequired,
}

#[derive(thiserror::Error, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Identity {
const ABBREVIATION_LEN: usize = 16;

/// Returns an `Identity` defined as the given `bytes` byte array.
pub fn from_byte_array(bytes: [u8; 32]) -> Self {
pub const fn from_byte_array(bytes: [u8; 32]) -> Self {
Self {
__identity_bytes: bytes,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/relation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ impl Relation for DbTable {
}
}

#[derive(Debug, Clone, Eq, PartialEq)]
#[derive(Debug, Clone, Eq, PartialEq, From)]
pub enum Table {
MemTable(MemTable),
DbTable(DbTable),
Expand Down
Loading
Loading