-
Notifications
You must be signed in to change notification settings - Fork 2.9k
12589 move user and group admin from admin #12877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
773a4f9
125890 first working user list
arthanson b17dfa0
125890 first working user list
arthanson a609467
125890 add form fields
arthanson bd67cfb
125890 basic group objectpermission views
arthanson 4da0b83
125890 basic group objectpermission views
arthanson 2fdd834
125890 fix group permission views
arthanson f1eadc6
125890 fix objectpermission form
arthanson 4560eb6
125890 fixes
arthanson 30a168a
125890 fixes
arthanson 057fbf0
12589 fix boolean filters
arthanson 78ef1d1
12589 UI fixes
arthanson 3ed852f
12589 UI fixes
arthanson cc7f768
12589 fix users object_permissions m2m
arthanson 281aa92
12589 fix objectpermissionform
arthanson 1435cd7
12589 fix user/group create
arthanson 3c60911
12589 user RestrictedQuerySet for permission
arthanson 4332ba0
12589 user RestrictedQuerySet for permission
arthanson 5403396
12589 add user group manager
arthanson d0d74c9
12589 update comments
arthanson bdfcb93
12589 fix permission model check
arthanson 39608f6
12589 fixes for add/edit user form
arthanson 8267ca5
12589 fix for Objectchange
arthanson bce8672
12589 test fixes
arthanson 98ac45e
12589 fix tests
arthanson 53b1998
12589 fix tests
arthanson 923afae
12589 fix tests
arthanson 0fee7b7
12589 bulk edit test fixes
arthanson ef4e9bd
12589 export objects test fixes
arthanson 53fe449
12589 group test fixes
arthanson ee29b27
12589 cleanup
arthanson b3b59a2
12589 objectpermission get_absolute_url
arthanson e7b2154
12589 validation error
arthanson 93ba0c0
12589 validation error
arthanson c4131af
12589 objectpermission bulk edit
arthanson c25fee9
12589 objectpermission test fixes
arthanson 8e57521
12589 objectpermission test fixes for create check where create new o…
arthanson 4e418ba
12589 objectpermission test fixes for create check where create new o…
arthanson 171f85d
12589 objectpermission remove bulk import
arthanson 12cd1af
12589 merge feature
arthanson 1f08dc6
12589 update proflie base template
arthanson 54ae418
12589 change password
arthanson 0565663
12589 remove from admin
arthanson b851f33
12589 merge and add missing files
arthanson e2cc63f
12589 review changes and add localization
arthanson 2cc7e49
12589 review changes for linkify column
arthanson 7307ee4
12589 fix template
arthanson 40c8e67
12589 translate templates
arthanson 2871cb9
12589 review changes
arthanson 101db0f
12589 review changes
arthanson 002c0bf
12589 review changes
arthanson 6a98397
12589 review changes - permission proxy
arthanson 8d84eec
12589 review changes - change permission check
arthanson f9f3899
12589 review changes - change permission check
arthanson 32f772d
12589 review changes - change permission check
arthanson 1a33637
12589 change password in edit view
arthanson 68cd6ef
12589 user bulk import
arthanson cc3c64c
12589 missing test file
arthanson 55d1918
12589 dont check password field for tests
arthanson 17b0456
12589 dont check password field for tests
arthanson a1af7f2
12589 remove special perm
arthanson 2c7c3bc
12589 update menu permissions for auth models
arthanson 846eef1
Merge branch 'feature' into 12589-user-admin
arthanson dd70ba9
12589 fix friggin test case
arthanson 6a5c44f
Reorganize account view templates
jeremystretch d8ad97e
Create menu items manually for users & groups to accomodate proxy models
jeremystretch 937961b
Restore bookmarks tab on account views
jeremystretch 30d9798
Clean up user bulk edit
jeremystretch f49b43d
Remove unused form classes
jeremystretch 4702cc0
Clean up permissions bulk edit
jeremystretch 56cb542
Clean up user & group import
jeremystretch d24330f
Clean up filtering for users, groups, and permissions
jeremystretch b5362f0
Clean up model forms
jeremystretch 34b8d2a
Misc cleanup
jeremystretch 5c2f0c5
Flesh out object templates
jeremystretch 235da43
Clean up tests
jeremystretch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
netbox/templates/users/api_tokens.html → ...x/templates/users/account/api_tokens.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
netbox/templates/users/base.html → netbox/templates/users/account/base.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
netbox/templates/users/bookmarks.html → ...ox/templates/users/account/bookmarks.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
netbox/templates/users/password.html → netbox/templates/users/account/password.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
netbox/templates/users/preferences.html → .../templates/users/account/preferences.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
netbox/templates/users/profile.html → netbox/templates/users/account/profile.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% extends 'generic/object.html' %} | ||
{% load i18n %} | ||
{% load helpers %} | ||
{% load render_table from django_tables2 %} | ||
|
||
{% block title %}{% trans "Group" %} {{ 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 "Group" %}</h5> | ||
<div class="card-body"> | ||
<table class="table table-hover attr-table"> | ||
<tr> | ||
<th scope="row">{% trans "Name" %}</th> | ||
<td>{{ object.name }}</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="card"> | ||
<h5 class="card-header">{% trans "Users" %}</h5> | ||
<div class="list-group list-group-flush"> | ||
{% for user in object.user_set.all %} | ||
<a href="{% url 'users:netboxuser' 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 Permissions" %}</h5> | ||
<div class="list-group list-group-flush"> | ||
{% for perm in object.object_permissions.all %} | ||
<a href="{% url 'users:objectpermission' pk=perm.pk %}" class="list-group-item list-group-item-action">{{ perm }}</a> | ||
{% empty %} | ||
<div class="list-group-item text-muted">{% trans "None" %}</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{% 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> | ||
<div class="card-body"> | ||
<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> | ||
<div class="card"> | ||
<h5 class="card-header">{% trans "Actions" %}</h5> | ||
<div class="card-body"> | ||
<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> | ||
<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:netboxuser' 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:netboxgroup' 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 %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{% extends 'generic/object.html' %} | ||
{% load i18n %} | ||
{% load helpers %} | ||
{% load render_table from django_tables2 %} | ||
|
||
{% block title %}{% trans "User" %} {{ object.username }}{% endblock %} | ||
|
||
{% block subtitle %}{% endblock %} | ||
|
||
{% block content %} | ||
<div class="row mb-3"> | ||
<div class="col-md-6"> | ||
<div class="card"> | ||
<h5 class="card-header">{% trans "User" %}</h5> | ||
<div class="card-body"> | ||
<table class="table table-hover attr-table"> | ||
<tr> | ||
<th scope="row">{% trans "Username" %}</th> | ||
<td>{{ object.username }}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{% trans "Full Name" %}</th> | ||
<td>{{ object.get_full_name|placeholder }}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{% trans "Email" %}</th> | ||
<td>{{ object.email|placeholder }}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{% trans "Account Created" %}</th> | ||
<td>{{ object.date_joined|annotated_date }}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{% trans "Active" %}</th> | ||
<td>{% checkmark object.active %}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{% trans "Staff" %}</th> | ||
<td>{% checkmark object.is_staff %}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{% trans "Superuser" %}</th> | ||
<td>{% checkmark object.is_superuser %}</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<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:netboxgroup' 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 class="card"> | ||
<h5 class="card-header">{% trans "Assigned Permissions" %}</h5> | ||
<div class="list-group list-group-flush"> | ||
{% for perm in object.object_permissions.all %} | ||
<a href="{% url 'users:objectpermission' pk=perm.pk %}" class="list-group-item list-group-item-action">{{ perm }}</a> | ||
{% empty %} | ||
<div class="list-group-item text-muted">{% trans "None" %}</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
arthanson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</div> | ||
{% if perms.extras.view_objectchange %} | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="card"> | ||
<h5 class="card-header text-center">{% trans "Recent Activity" %}</h5> | ||
<div class="card-body table-responsive"> | ||
{% render_table changelog_table 'inc/table.html' %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% endblock %} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.