mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* Rename sequences & indexes after renaming users table * Migrate from auth.Group to a custom group model * Delete original groups from auth_group table * Update object & multi-object custom fields referencing the Group model * Fix ContentType resolution * Clean up obsolete logic for view/serializer resolution
94 lines
3.1 KiB
HTML
94 lines
3.1 KiB
HTML
{% extends 'generic/object.html' %}
|
|
{% load i18n %}
|
|
{% load helpers %}
|
|
{% load render_table from django_tables2 %}
|
|
|
|
{% block title %}{% trans "Permission" %} {{ object.name }}{% endblock %}
|
|
|
|
{% block subtitle %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row mb-3">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<h5 class="card-header">{% trans "Permission" %}</h5>
|
|
<table class="table table-hover attr-table">
|
|
<tr>
|
|
<th scope="row">{% trans "Name" %}</th>
|
|
<td>{{ object.name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Description" %}</th>
|
|
<td>{{ object.description|placeholder }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Enabled" %}</th>
|
|
<td>{% checkmark object.enabled %}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="card">
|
|
<h5 class="card-header">{% trans "Actions" %}</h5>
|
|
<table class="table table-hover attr-table">
|
|
<tr>
|
|
<th scope="row">{% trans "View" %}</th>
|
|
<td>{% checkmark object.can_view %}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Add" %}</th>
|
|
<td>{% checkmark object.can_add %}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Change" %}</th>
|
|
<td>{% checkmark object.can_change %}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Delete" %}</th>
|
|
<td>{% checkmark object.can_delete %}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="card">
|
|
<h5 class="card-header">{% trans "Constraints" %}</h5>
|
|
<div class="card-body">
|
|
{% if object.constraints %}
|
|
<pre>{{ object.constraints|json }}</pre>
|
|
{% else %}
|
|
<span class="text-muted">None</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<h5 class="card-header">{% trans "Object Types" %}</h5>
|
|
<ul class="list-group list-group-flush">
|
|
{% for user in object.object_types.all %}
|
|
<li class="list-group-item">{{ user }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
<div class="card">
|
|
<h5 class="card-header">{% trans "Assigned Users" %}</h5>
|
|
<div class="list-group list-group-flush">
|
|
{% for user in object.users.all %}
|
|
<a href="{% url 'users:user' pk=user.pk %}" class="list-group-item list-group-item-action">{{ user }}</a>
|
|
{% empty %}
|
|
<div class="list-group-item text-muted">{% trans "None" %}</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<h5 class="card-header">{% trans "Assigned Groups" %}</h5>
|
|
<div class="list-group list-group-flush">
|
|
{% for group in object.groups.all %}
|
|
<a href="{% url 'users:group' pk=group.pk %}" class="list-group-item list-group-item-action">{{ group }}</a>
|
|
{% empty %}
|
|
<div class="list-group-item text-muted">{% trans "None" %}</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|