Actions
Story #4074
closedStory #3968: As a Pulp user, I can protect content I have stored in Pulp
As a user, the content guard logic needs to be loaded and used by the content app.
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:
0%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 45
Quarter:
Description
Plugin content guard logic needs to be loaded and associated with a ContentGuard model (class). The content needs to delegate authorization to the content-guard when handling a GET request.
The logic is loaded an associated with a ContentGuard model (class) using a decorator.
@contentguard(model=FooGuard)
def permit(request, content_guard):
pass
Something like this In the content app:
try:
contentguard.permit(request, distribution)
except PermissionError:
return HttpResponseForbidden()
Related issues
Actions
Delegate content authorization to optional content-guard. closes #3970