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

Database download should implement cascading permissions #1058

Closed
simonw opened this issue Oct 27, 2020 · 1 comment
Closed

Database download should implement cascading permissions #1058

simonw opened this issue Oct 27, 2020 · 1 comment

Comments

@simonw
Copy link
Owner

simonw commented Oct 27, 2020

class DatabaseDownload(DataView):
name = "database_download"
async def view_get(self, request, database, hash, correct_hash_present, **kwargs):
await self.check_permission(request, "view-instance")
await self.check_permission(request, "view-database", database)
await self.check_permission(request, "view-database-download", database)

Should be updated for #832 cascading permissions. Example commit: d6e03b0

@simonw
Copy link
Owner Author

simonw commented Oct 27, 2020

Example:

await self.check_permissions(
request,
[
("view-database", database),
"view-instance",
],
)

@simonw simonw closed this as completed in 7d9fedc Oct 28, 2020
simonw added a commit that referenced this issue Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant