Skip to content

Commit

Permalink
feat(rust): add a payment role
Browse files Browse the repository at this point in the history
  • Loading branch information
etorreborre committed Jan 24, 2025
1 parent 8143e50 commit 22304b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ mod test {
RoleInShare::Admin => "[email protected]",
RoleInShare::Service => "[email protected]",
RoleInShare::Guest => "[email protected]",
RoleInShare::Payment => "[email protected]",
},
}
.try_into()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub enum RoleInShare {
#[n(0)] Admin,
#[n(1)] Guest,
#[n(2)] Service,
#[n(3)] Payment,
}

impl Display for RoleInShare {
Expand All @@ -24,6 +25,7 @@ impl Display for RoleInShare {
Self::Admin => write!(f, "admin"),
Self::Guest => write!(f, "guest"),
Self::Service => write!(f, "service_user"),
Self::Payment => write!(f, "payment"),
}
}
}
Expand All @@ -36,6 +38,7 @@ impl FromStr for RoleInShare {
"admin" => Ok(Self::Admin),
"guest" => Ok(Self::Guest),
"service_user" => Ok(Self::Service),
"payment" => Ok(Self::Payment),
other => Err(format!("unknown role: {other}")),
}
}
Expand Down

0 comments on commit 22304b4

Please sign in to comment.