Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Userpass: Update the password and policies associated to user #1216

Merged
merged 15 commits into from
Mar 16, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change path structure of password and policies endpoints in userpass
  • Loading branch information
vishalnayak committed Mar 15, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0e1769dd5d183e355a8bb3367ac5c63e869c3910
6 changes: 3 additions & 3 deletions builtin/credential/userpass/backend_test.go
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ func TestBackend_userCrud(t *testing.T) {
})
}

func TestBacken_userCreateOperation(t *testing.T) {
func TestBackend_userCreateOperation(t *testing.T) {
b, err := Factory(&logical.BackendConfig{
Logger: nil,
System: &logical.StaticSystemView{
@@ -184,7 +184,7 @@ func TestBackend_policiesUpdate(t *testing.T) {
func testUpdatePassword(t *testing.T, user, password string) logicaltest.TestStep {
return logicaltest.TestStep{
Operation: logical.UpdateOperation,
Path: "users/password/" + user,
Path: "users/" + user + "/password",
Data: map[string]interface{}{
"password": password,
},
@@ -194,7 +194,7 @@ func testUpdatePassword(t *testing.T, user, password string) logicaltest.TestSte
func testUpdatePolicies(t *testing.T, user, policies string) logicaltest.TestStep {
return logicaltest.TestStep{
Operation: logical.UpdateOperation,
Path: "users/policies/" + user,
Path: "users/" + user + "/policies",
Data: map[string]interface{}{
"policies": policies,
},
2 changes: 1 addition & 1 deletion builtin/credential/userpass/path_user_password.go
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ import (

func pathUserPassword(b *backend) *framework.Path {
return &framework.Path{
Pattern: "users/password/" + framework.GenericNameRegex("name"),
Pattern: "users/" + framework.GenericNameRegex("name") + "/password$",
Fields: map[string]*framework.FieldSchema{
"name": &framework.FieldSchema{
Type: framework.TypeString,
2 changes: 1 addition & 1 deletion builtin/credential/userpass/path_user_policies.go
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ import (

func pathUserPolicies(b *backend) *framework.Path {
return &framework.Path{
Pattern: "users/policies/" + framework.GenericNameRegex("name"),
Pattern: "users/" + framework.GenericNameRegex("name") + "/policies$",
Fields: map[string]*framework.FieldSchema{
"name": &framework.FieldSchema{
Type: framework.TypeString,