-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support creating and updating users with a PIN (#65)
* Replace User.Pin field with a Pin struct that allows setting a PIN value when creating or updating users * Update User acceptance test to check the pin attribute * Add new User test case * Add separate example for a user with pin * Ignore User.Pin.IsSet when setting an updated user PIN * Pointer receiver in MarshalJSON function
- Loading branch information
Showing
6 changed files
with
118 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,16 @@ resource "pritunl_user" "test" { | |
] | ||
} | ||
|
||
resource "pritunl_user" "test_pin" { | ||
name = "test-user-pin" | ||
organization_id = pritunl_organization.developers.id | ||
email = "[email protected]" | ||
pin = "123456" | ||
groups = [ | ||
"admins", | ||
] | ||
} | ||
|
||
resource "pritunl_server" "test" { | ||
name = "test" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters