Refactor 3-col-content
This commit is contained in:
parent
326b3d5dd3
commit
a711fb9768
37 changed files with 453 additions and 384 deletions
|
@ -671,21 +671,13 @@ class OrganizationRequestBaseView(
|
|||
LoginRequiredMixin,
|
||||
SingleObjectTemplateResponseMixin,
|
||||
SingleObjectMixin,
|
||||
AdminOrganizationMixin,
|
||||
):
|
||||
model = Organization
|
||||
slug_field = "key"
|
||||
slug_url_kwarg = "key"
|
||||
tab = None
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
organization = super(OrganizationRequestBaseView, self).get_object(queryset)
|
||||
if not (
|
||||
organization.admins.filter(id=self.request.profile.id).exists()
|
||||
or organization.registrant_id == self.request.profile.id
|
||||
):
|
||||
raise PermissionDenied()
|
||||
return organization
|
||||
|
||||
def get_content_title(self):
|
||||
return _("Manage join requests")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue