feat: Added userplus role in IAM, who has the same opportunities as the user, but may also create a bucket

This commit is contained in:
jonaustin09
2024-02-20 14:24:26 -05:00
parent 8d229b5878
commit fa54dfeb9f
7 changed files with 23 additions and 15 deletions
+3 -3
View File
@@ -164,14 +164,14 @@ func createUser(ctx *cli.Context) error {
if access == "" || secret == "" {
return fmt.Errorf("invalid input parameters for the new user")
}
if role != "admin" && role != "user" {
return fmt.Errorf("invalid input parameter for role")
if role != string(auth.RoleAdmin) && role != string(auth.RoleUser) && role != string(auth.RoleUserPlus) {
return fmt.Errorf("invalid input parameter for role: %v", role)
}
acc := auth.Account{
Access: access,
Secret: secret,
Role: role,
Role: auth.Role(role),
UserID: userID,
GroupID: groupID,
ProjectID: projectID,