enterprise/reports: add users and events export#18088
enterprise/reports: add users and events export#18088GirlBossRush merged 49 commits intogoauthentik:mainfrom
Conversation
✅ Deploy Preview for authentik-docs canceled.
|
✅ Deploy Preview for authentik-integrations canceled.
|
✅ Deploy Preview for authentik-storybook canceled.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #18088 +/- ##
========================================
Coverage 93.19% 93.20%
========================================
Files 929 941 +12
Lines 51174 51561 +387
========================================
+ Hits 47694 48058 +364
- Misses 3480 3503 +23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…umption check is not lost when compiling to optimised byte code
…ke reduce coupling of enterprise with the rest of authentik
…tead of accessing default_storage directly, so all the FileField.save logic can run correctly (e.g. creating directories)
ef79a86 to
1339da0
Compare
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: Dewi Roberts <dewi@goauthentik.io>
kensternberg-authentik
left a comment
There was a problem hiding this comment.
There's a teeny-tiny bit of ugliness with the export button.
| renderEnterpriseRequired() { | ||
| return html`<a href="#/enterprise/licenses" class="pf-c-nav__link"> | ||
| ${this.label} | ||
| <span class="pf-c-nav__enterprise-notice">${msg("Enterprise only")}</span> | ||
| </a>`; | ||
| } | ||
|
|
||
| renderWithPath() { | ||
| if (this.enterprise && !this.hasEnterpriseLicense) { | ||
| if (!this.can(CapabilitiesEnum.IsEnterprise)) return nothing; | ||
| else return this.renderEnterpriseRequired(); | ||
| } |
There was a problem hiding this comment.
@kensternberg-authentik request for design opinions
There was a problem hiding this comment.
I think this one is fine. There's a difference between "That's not how we do things here" and "I wouldn't have named it that." This feels a little bit like the latter. And Marc's name is more expressive of intent, at least to me.
|
Proposal for the UI:
|
tanberry
left a comment
There was a problem hiding this comment.
This is a great feature, and great docs to go with it, thanks @atereshkin ! A couple of nits, please, then good-to-go.
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
…ttings display:none) when there's no license
Signed-off-by: Jens Langhammer <jens@goauthentik.io> # Conflicts: # authentik/core/api/users.py # schema.yml
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
tanberry
left a comment
There was a problem hiding this comment.
Looks great, a fantastic feature to have, thanks @atereshkin !
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
kensternberg-authentik
left a comment
There was a problem hiding this comment.
I still think the UI code looks fine. Routine, other than the "enterprise" tag.
Details
This implements users and events csv export for the enterprise version of authentik.
A new app called "authentik.enterprise.reports" has been added to house this as well as future report generation logic.
The following new UI elements were added: "Data Exports" page (under Events), Export button in Drectory > Users, Export button in Events > Logs. The buttons are only visible when a valid enterprise license is installed.
WARNING
This PR does not implement any access control on the export files. It should only be merged once secure file storage is available.
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)