{% extends "layouts/app.html" %} {% from "components/breadcrumb.html" import page_header %} {% from "components/button.html" import button %} {% block title %}Access Analyzer - NeoZen Admin{% endblock %} {% block page_header %} {% call page_header("Access Analyzer", subtitle="Analyze who has access to what", breadcrumbs=[{"label": "Permissions", "href": "/permissions"}, {"label": "Access Analyzer"}]) %} {% endcall %} {% endblock %} {% block content %}

Who has access to...?

What can this user do?

{% if results is not none %}
{% if query_type == 'permission' %}

Users with {{ query_value }} permission

{% if results %}
{% for item in results %} {% endfor %}
User Source Source Type
{{ (item.subject.email[0] | upper) if item.subject.email else '?' }}
{{ item.source_name }} {% if item.source_type == 'role' %} Direct Role {% else %} Via Group {% endif %}

Found {{ results|length }} user(s) with this permission.

{% else %}

No users found

No users have this permission.

{% endif %} {% elif query_type == 'user' %}

Effective permissions for user

{% if results %}
{% for item in results %} {% endfor %}
Permission Source Source Type
{{ item.permission }} {{ item.source_name }} {% if item.source_type == 'role' %} Direct Role {% else %} Via Group {% endif %}

Permission Summary

{% set categories = {} %} {% for item in results %} {% set cat = item.permission.split(':')[0] %} {% if cat not in categories %} {% set _ = categories.update({cat: 0}) %} {% endif %} {% set _ = categories.update({cat: categories[cat] + 1}) %} {% endfor %} {% for cat, count in categories.items() %} {{ cat }} {{ count }} {% endfor %}

User has {{ results|length }} effective permission(s).

{% else %}

No permissions

This user has no permissions assigned.

{% endif %} {% endif %}
{% else %}

Select a query

Use the forms above to analyze access permissions.

{% endif %}
{% endblock %}