mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-17 20:10:51 +02:00
s3api: fix CreateServiceAccount gRPC handler to map required fields
This commit is contained in:
@@ -174,6 +174,11 @@ func (s3a *S3ApiServer) CreateServiceAccount(ctx context.Context, req *iam_pb.Cr
|
||||
values.Set("Action", "CreateServiceAccount")
|
||||
if req.ServiceAccount != nil {
|
||||
values.Set("CreatedBy", req.ServiceAccount.CreatedBy)
|
||||
values.Set("ParentUser", req.ServiceAccount.ParentUser)
|
||||
values.Set("Description", req.ServiceAccount.Description)
|
||||
if req.ServiceAccount.Expiration > 0 {
|
||||
values.Set("Expiration", fmt.Sprintf("%d", req.ServiceAccount.Expiration))
|
||||
}
|
||||
}
|
||||
_, err := s3a.executeAction(values)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user