Skip to content

Commit

Permalink
Merge pull request #21 from BESTSELLER/limited_guest_access
Browse files Browse the repository at this point in the history
Added limited Guest access for groups and users
  • Loading branch information
wrighbr authored Nov 2, 2020
2 parents 6b5fca4 + 0ee7387 commit 21ecbd6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions client/project_members.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func RoleTypeNumber(role int) (x string) {
x = "guest"
case 4:
x = "master"
case 5:
x = "limitedguest"
}
return x
}
Expand All @@ -60,6 +62,8 @@ func RoleType(role string) (x int) {
x = 3
case "master":
x = 4
case "limitedguest":
x = 5
}
return x
}
4 changes: 2 additions & 2 deletions provider/resource_project_member_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func resourceMembersGroup() *schema.Resource {
Required: true,
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
v := val.(string)
if v != "projectadmin" && v != "developer" && v != "guest" && v != "master" {
errs = append(errs, fmt.Errorf("%q must be either projectadmin, developer, guest or master, got: %s", key, v))
if v != "projectadmin" && v != "developer" && v != "guest" && v != "master" && v != "limitedguest" {
errs = append(errs, fmt.Errorf("%q must be either projectadmin, developer, guest, limitedguest or master, got: %s", key, v))
}
return
},
Expand Down
4 changes: 2 additions & 2 deletions provider/resource_project_member_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func resourceMembersUser() *schema.Resource {
Required: true,
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
v := val.(string)
if v != "projectadmin" && v != "developer" && v != "guest" && v != "master" {
errs = append(errs, fmt.Errorf("%q must be either projectadmin, developer, guest or master, got: %s", key, v))
if v != "projectadmin" && v != "developer" && v != "guest" && v != "master" && v != "limitedguest" {
errs = append(errs, fmt.Errorf("%q must be either projectadmin, developer, guest, limitedguest or master, got: %s", key, v))
}
return
},
Expand Down

0 comments on commit 21ecbd6

Please sign in to comment.