fix: reading a single article follows the same rule as the list: anyone can read an online article, a verified user can also read an offline one, and an unknown or hidden id returns 404
This commit is contained in:
1 parent
2ee28203ab
commit
81c4b62175
11 files changed
+510
-28
No files matched your search
@@ -54,6 +54,11 @@ Feature: Protected article routes and the offline-inclusive listing require a ve
|
||||
for the purpose of choosing which list to show, so the listing still answers 200 with the
|
||||
online-only array rather than failing the request; only a failure inside ListOnlineArticles
|
||||
or ListAllArticles itself still answers 500, unchanged from features/public_article_listing.feature
|
||||
And a later slice, features/public_article_read.feature, moves GET /v1/article/{id} out of the
|
||||
Verifier + Authenticator + RequireVerifiedUser group entirely and into the Verifier-only group
|
||||
next to GET /v1/article/, so that route no longer answers 401 for a missing cookie or 403 for
|
||||
an unverified caller; the "GET /v1/article/1" row is therefore removed from both Examples
|
||||
tables below
|
||||
|
||||
Scenario Outline: An authenticated but unverified user is refused on every protected article route
|
||||
Given a user repository containing user id 1, is_verified false
|
||||
@@ -65,7 +70,6 @@ Feature: Protected article routes and the offline-inclusive listing require a ve
|
||||
|
||||
Examples:
|
||||
| method | path |
|
||||
| GET | /v1/article/1 |
|
||||
| POST | /v1/article/ |
|
||||
| DELETE | /v1/article/1 |
|
||||
| PATCH | /v1/article/1 |
|
||||
@@ -113,7 +117,6 @@ Feature: Protected article routes and the offline-inclusive listing require a ve
|
||||
|
||||
Examples:
|
||||
| method | path |
|
||||
| GET | /v1/article/1 |
|
||||
| POST | /v1/article/ |
|
||||
|
||||
Scenario: A repository failure while resolving the caller's verification status answers 500
|
||||
|
||||
Reference in new issue
Block a user