Skip to content

Commit

Permalink
Replace uses of 'archives/write' permission with 'resources/read'
Browse files Browse the repository at this point in the history
  • Loading branch information
dantb committed Sep 19, 2023
1 parent 32f1b6c commit 872ea4b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 14 deletions.
2 changes: 0 additions & 2 deletions delta/app/src/main/resources/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ app {
"schemas/write",
"files/write",
"storages/write",
"archives/write",
"version/read",
"quotas/read",
"supervision/read"
Expand All @@ -139,7 +138,6 @@ app {
"schemas/write",
"files/write",
"storages/write",
"archives/write",
"version/read",
"quotas/read"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ package object model {
*/
object permissions {
final val read: Permission = Permissions.resources.read
final val write: Permission = Permission.unsafe("archives/write")
final val write: Permission = Permissions.resources.read
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ class ArchiveRoutesSpec extends BaseRouteSpec with StorageFixtures with TryValue

private val perms = Seq(
Permissions.resources.write,
Permissions.resources.read,
model.permissions.read,
model.permissions.write
Permissions.resources.read
)

private val asSubject = addCredentials(OAuth2BearerToken("user"))
Expand Down
5 changes: 1 addition & 4 deletions docs/src/main/paradox/docs/delta/api/archives-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ Each archive...

@@@ note { .tip title="Authorization notes" }

When modifying archives, the caller must have `archives/write` permissions on the current path of the project or the
ancestor paths.

When reading archives, the caller must have `resources/read` permissions on the current path of the project or the
For both reading and modifying archives, the caller must have `resources/read` permissions on the current path of the project or the
ancestor paths.

Please visit @ref:[Authentication & authorization](authentication.md) section to learn more about it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"acls/read",
"projects/read",
"permissions/read",
"archives/write",
"organizations/create",
"views/query",
"storages/write",
Expand Down
3 changes: 0 additions & 3 deletions docs/src/main/paradox/docs/delta/api/permissions-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ Currently, the following permissions are required:
- default permissions for storages
- `storages/write`

- default permissions for archives
- `archives/write`

- default permissions for the version endpoint
- `version/read`

Expand Down

0 comments on commit 872ea4b

Please sign in to comment.