Service account policy UI (#1519)
* saving * service account policy UI * fixing warning * Update portal-ui/src/screens/Console/Account/ServiceAccountPolicy.tsx Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * fixing comment Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ package restapi
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
@@ -366,6 +367,11 @@ func getServiceAccountPolicy(ctx context.Context, userClient MinioAdmin, accessK
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
var policy iampolicy.Policy
|
||||
json.Unmarshal([]byte(serviceAccountInfo.Policy), &policy)
|
||||
if policy.Statements == nil {
|
||||
return "", nil
|
||||
}
|
||||
return serviceAccountInfo.Policy, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user