{% extends 'base.html' %} {% load static %} {% load permission_filters %} {% block title %}Staff Permissions - {{ user.get_full_name }}{% endblock %} {% block content %}

🛡️ Staff Permissions

Manage detailed permissions for {{ user.get_full_name }}

Back to Staff List
{% if user.profile_image %} {% elif user.selfie %} {% else %}
{{ user.get_initials }}
{% endif %}

{{ user.get_full_name }}

{{ user.email }}

{{ user.phone_number }}

{% if user.role == 'admin' %} Administrator {% elif user.role == 'team_leader' %} 👔Team Leader {% elif user.role == 'loan_officer' %} Loan Officer {% elif user.role == 'secretary' %} Secretary {% endif %} {% if user.status == 'active' %} Active {% else %} {{ user.status|title }} {% endif %}
{% if messages %} {% for message in messages %}

{{ message }}

{% endfor %} {% endif %}
{% csrf_token %}

Permission Legend

Role Default (Allowed)
Role Default (Denied)
Custom Override

⚙️ Detailed Permissions

|

Main Navigation Pages

{% for module_choice in modules %} {% if module_choice.0 in 'dashboard,clients,loans,repayments,portfolio,reports_statements,documents,customer_documents,payment_receipts,notifications,settings'|split:',' %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}

Dashboard Specific Permissions

{% for module_choice in modules %} {% if 'dashboard_' in module_choice.0 %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}

Clients Page Specific Permissions

{% for module_choice in modules %} {% if 'clients_' in module_choice.0 %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}

💵Loans Page Specific Permissions

{% for module_choice in modules %} {% if 'loans_' in module_choice.0 %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}

📊Reports & Statements Page Specific Permissions

{% for module_choice in modules %} {% if 'reports_' in module_choice.0 or 'statements_' in module_choice.0 %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}

💰Repayments Page Specific Permissions

{% for module_choice in modules %} {% if 'repayments_' in module_choice.0 %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}

Portfolio Page Specific Permissions

{% for module_choice in modules %} {% if 'portfolio_' in module_choice.0 %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}

📄Documents & Receipts Page Specific Permissions

{% for module_choice in modules %} {% if 'documents_' in module_choice.0 or 'customer_docs_' in module_choice.0 or 'receipts_' in module_choice.0 %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}

⚙️Notifications & Settings Page Specific Permissions

{% for module_choice in modules %} {% if 'notifications_' in module_choice.0 or 'settings_' in module_choice.0 %} {% with module=module_choice.0 module_name=module_choice.1 %}

{{ module_name }}

{% for action_choice in actions %} {% with action=action_choice.0 action_name=action_choice.1 %} {% with effective_perm=effective_permissions|get_item:module|get_item:action %}
{{ action_name }}
{% if effective_perm.source == 'custom' %} C {% elif effective_perm.source == 'role' %} R {% else %} S {% endif %} {% if effective_perm.allowed %} {% else %} {% endif %}
{% endwith %} {% endwith %} {% endfor %}
{% endwith %} {% endif %} {% endfor %}
Cancel
{% endblock %}