|
@ -38,13 +38,14 @@ func NewIdentityAccessManagement(option *S3ApiServerOption) *IdentityAccessManag |
|
|
iam := &IdentityAccessManagement{ |
|
|
iam := &IdentityAccessManagement{ |
|
|
domain: option.DomainName, |
|
|
domain: option.DomainName, |
|
|
} |
|
|
} |
|
|
if err := iam.loadS3ApiConfigurationFromFiler(option); err != nil { |
|
|
if option.Config != "" { |
|
|
glog.Warningf("fail to load config: %v", err) |
|
|
|
|
|
} |
|
|
|
|
|
if len(iam.identities) == 0 && option.Config != "" { |
|
|
|
|
|
if err := iam.loadS3ApiConfigurationFromFile(option.Config); err != nil { |
|
|
if err := iam.loadS3ApiConfigurationFromFile(option.Config); err != nil { |
|
|
glog.Fatalf("fail to load config file %s: %v", option.Config, err) |
|
|
glog.Fatalf("fail to load config file %s: %v", option.Config, err) |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
if err := iam.loadS3ApiConfigurationFromFiler(option); err != nil { |
|
|
|
|
|
glog.Warningf("fail to load config: %v", err) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
return iam |
|
|
return iam |
|
|
} |
|
|
} |
|
|
xxxxxxxxxx