This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/audit/views.py

31 lines
734 B
Python
Raw Normal View History

2019-10-28 13:26:34 +00:00
"""passbook Event administration"""
from django.contrib.auth.mixins import LoginRequiredMixin
2018-12-14 09:28:37 +00:00
from django.views.generic import ListView
from guardian.mixins import PermissionListMixin
2018-12-14 09:28:37 +00:00
from passbook.admin.views.utils import SearchListMixin, UserPaginateListMixin
2019-10-28 13:26:34 +00:00
from passbook.audit.models import Event
2018-12-14 09:28:37 +00:00
class EventListView(
PermissionListMixin,
LoginRequiredMixin,
SearchListMixin,
UserPaginateListMixin,
ListView,
):
2018-12-14 09:28:37 +00:00
"""Show list of all invitations"""
2019-10-28 13:26:34 +00:00
model = Event
template_name = "audit/list.html"
2019-12-31 11:51:16 +00:00
permission_required = "passbook_audit.view_event"
ordering = "-created"
search_fields = [
"user",
"action",
"app",
"context",
"client_ip",
]