mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-08 06:13:14 +00:00
test accountinfo
This commit is contained in:
@@ -14,7 +14,7 @@ use super::condition::{
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone, PartialEq, Eq)]
|
||||
|
||||
pub struct ActionSet(HashSet<Action>);
|
||||
pub struct ActionSet(pub HashSet<Action>);
|
||||
|
||||
impl ActionSet {
|
||||
pub fn is_match(&self, act: &Action) -> bool {
|
||||
|
||||
@@ -41,6 +41,12 @@ pub struct Resource {
|
||||
}
|
||||
|
||||
impl Resource {
|
||||
pub fn new(pattern: &str) -> Self {
|
||||
Self {
|
||||
pattern: pattern.to_owned(),
|
||||
rtype: ResourceARNType::ResourceARNS3,
|
||||
}
|
||||
}
|
||||
pub fn validate_bucket(&self, bucket: &str) -> Result<()> {
|
||||
self.validate()?;
|
||||
if !wildcard::match_pattern(&self.pattern, bucket)
|
||||
@@ -187,7 +193,7 @@ impl<'de> Deserialize<'de> for Resource {
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq, Eq)]
|
||||
#[serde(transparent)]
|
||||
pub struct ResourceSet(HashSet<Resource>);
|
||||
pub struct ResourceSet(pub HashSet<Resource>);
|
||||
|
||||
impl ResourceSet {
|
||||
pub fn validate_bucket(&self, bucket: &str) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user