-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
controllers/user/admin: add an unlock route
- Loading branch information
Showing
11 changed files
with
223 additions
and
3 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
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
20 changes: 20 additions & 0 deletions
20
...s/routes/users/snapshots/crates_io__tests__routes__users__admin__unlock__admin-found.snap
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
source: src/tests/routes/users/admin.rs | ||
expression: response.json() | ||
--- | ||
{ | ||
"avatar": null, | ||
"email": "[email protected]", | ||
"email_verification_sent": true, | ||
"email_verified": true, | ||
"id": 1, | ||
"is_admin": false, | ||
"lock": { | ||
"reason": "naughty naughty", | ||
"until": "[datetime]" | ||
}, | ||
"login": "foo", | ||
"name": null, | ||
"publish_notifications": true, | ||
"url": "https://github.com/foo" | ||
} |
5 changes: 5 additions & 0 deletions
5
...utes/users/snapshots/crates_io__tests__routes__users__admin__unlock__admin-not-found.snap
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/tests/routes/users/admin.rs | ||
expression: response.text() | ||
--- | ||
{"errors":[{"detail":"Not Found"}]} |
20 changes: 20 additions & 0 deletions
20
...outes/users/snapshots/crates_io__tests__routes__users__admin__unlock__admin-reunlock.snap
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
source: src/tests/routes/users/admin.rs | ||
expression: response.json() | ||
--- | ||
{ | ||
"avatar": null, | ||
"email": "[email protected]", | ||
"email_verification_sent": true, | ||
"email_verified": true, | ||
"id": 1, | ||
"is_admin": false, | ||
"lock": { | ||
"reason": "naughty naughty", | ||
"until": "[datetime]" | ||
}, | ||
"login": "foo", | ||
"name": null, | ||
"publish_notifications": true, | ||
"url": "https://github.com/foo" | ||
} |
5 changes: 5 additions & 0 deletions
5
...utes/users/snapshots/crates_io__tests__routes__users__admin__unlock__anonymous-found.snap
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/tests/routes/users/admin.rs | ||
expression: response.text() | ||
--- | ||
{"errors":[{"detail":"this action requires authentication"}]} |
5 changes: 5 additions & 0 deletions
5
.../users/snapshots/crates_io__tests__routes__users__admin__unlock__anonymous-not-found.snap
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/tests/routes/users/admin.rs | ||
expression: response.text() | ||
--- | ||
{"errors":[{"detail":"this action requires authentication"}]} |
5 changes: 5 additions & 0 deletions
5
...utes/users/snapshots/crates_io__tests__routes__users__admin__unlock__non-admin-found.snap
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/tests/routes/users/admin.rs | ||
expression: response.text() | ||
--- | ||
{"errors":[{"detail":"This account is locked until 2050-01-01 at 01:02:03 UTC. Reason: naughty naughty"}]} |
5 changes: 5 additions & 0 deletions
5
.../users/snapshots/crates_io__tests__routes__users__admin__unlock__non-admin-not-found.snap
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/tests/routes/users/admin.rs | ||
expression: response.text() | ||
--- | ||
{"errors":[{"detail":"This account is locked until 2050-01-01 at 01:02:03 UTC. Reason: naughty naughty"}]} |