1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

298 Commits

Author SHA1 Message Date
Jeremy Stretch
b93b331d86 Fixes #13966: Restore 'last login' column on users table 2023-10-04 14:09:29 -04:00
Jeremy Stretch
c38884fa11 Add description & expires fields to token test 2023-09-01 12:33:02 -04:00
Abhimanyu Saharan
7848beedce adds additional parameters for token provision api #12870 2023-09-01 12:33:02 -04:00
Jeremy Stretch
cb93abb0f4 Fixes #13626: Correct filtering of recent activity list under user view 2023-08-31 08:19:17 -04:00
Jeremy Stretch
420090dc6c #12590: Exclude proxy model for Token from permission object types 2023-08-29 14:41:14 -04:00
Jeremy Stretch
2a4e3dd09f Merge branch 'develop' into feature 2023-08-29 10:45:55 -04:00
Abhimanyu Saharan
be2b24a155 fixes the swagger schema for token provisioning #13557 2023-08-25 09:45:03 -04:00
Jeremy Stretch
315c4bb1ac #13434: Fix tests 2023-08-10 14:32:48 -04:00
Jeremy Stretch
a332adf962 Fixes #13434: Randomly generate initial keys prior to the creation of new tokens 2023-08-10 14:11:16 -04:00
Jeremy Stretch
4d2ef0a8b5 Fixes #13433: User field on API token form should be required 2023-08-10 10:04:31 -04:00
Jeremy Stretch
caedc8dbe3 Closes #13352: Translation support for model verbose names (#13354)
* Update verbose_name & verbose_name_plural Meta attributes on all models

* Alter makemigrations to ignore verbose_name & verbose_name_plural changes
2023-08-03 10:41:10 -04:00
Jeremy Stretch
79030ecab2 #12589: Move username validation from form to NetBoxUser 2023-08-01 15:42:47 -04:00
Jeremy Stretch
e64289e791 #12589: Remove obsolete admin resources 2023-08-01 14:35:28 -04:00
Arthur Hanson
e284cd7e54 Closes #13150: Wrap table column headers with gettext()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 14:35:28 -04:00
Jeremy Stretch
34a960505d Remove obsolete AdminGroup and AdminUser models (#12589) 2023-07-31 14:28:50 -04:00
Arthur Hanson
b7a9649269 Closes #13149: Wrap form field labels with gettext_lazy()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 12:52:38 -04:00
Arthur Hanson
83bebc1bd2 Closes #13132: Wrap verbose_name and other model text with gettext_lazy() (i18n)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 11:28:07 -04:00
Jeremy Stretch
80376abedf Closes #13309: Introduce the account app (#13310)
* Introduce 'accounts' app for user-specific views & resources
* Move UserTokenTable to account app
* Move login & logout views to account app
2023-07-31 09:22:04 -04:00
Jeremy Stretch
07f68ae579 Closes #13038: Establish DEFAULT_PERMISSIONS config parameter (#13308)
* Introduce the DEFAULT_PERMISSIONS config parameter

* Establish default permissions for user token management
2023-07-30 15:04:58 -04:00
Jeremy Stretch
9b6e32896d Clean up users & account URLs 2023-07-25 15:48:40 -04:00
Arthur Hanson
7600d7b344 Closes #13228: Move token management views to primary UI 2023-07-25 13:43:40 -04:00
Arthur Hanson
a4acb50edd 12589 move user and group admin from admin (#12877)
Move admin views for users, groups, and object permissions from the admin site to the NetBox frontend

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-20 16:22:08 -04:00
Jeremy Stretch
837be4d45f Merge branch 'develop' into feature 2023-07-11 10:09:26 -04:00
Abhimanyu Saharan
62bdb90f61 Adds copy content button (#12584)
* adds copy content button #12499

* adds newline

* Omit hash mark from target string

* Clean up HTML element IDs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-06 14:19:55 -04:00
Jeremy Stretch
63ba9fb38c Fixes #11335: Default manager for ObjectChange should filter by installed apps (#11709)
* Fixes #11335: Default manager for ObjectChange should filter by installed apps

* Employ canonical model discovery mechanism

* Move filtering logic to valid_models() queryset method

* fixed import to avoid content type does not exist

* Cleanup

---------

Co-authored-by: Abhimanyu Saharan <desk.abhimanyu@gmail.com>
2023-07-05 11:39:35 -04:00
Jeremy Stretch
6e222f8dce Closes #8248: User bookmarks (#13035)
* Initial work on #8248

* Add tests

* Fix tests

* Add feature query for bookmarks

* Add BookmarksWidget

* Correct generic relation name

* Add docs for bookmarks

* Remove inheritance from ChangeLoggedModel
2023-06-29 14:36:11 -04:00
Arthur Hanson
518fd8cca6 12794 change User ref to get_user_model (#12905)
* 12794 change User ref to get_user_model

* 12794 call get_user_model once in tests

* 12794 call get_user_model once in tests

* 12794 use settings.AUTH_USER_MODEL for FK reference
2023-06-22 08:26:50 -04:00
Abhimanyu Saharan
5869894a48 Adds ip to failed logs (#12725)
* adds ip to failed logs #12562

* added additional logging when client ip cannot be determined
2023-05-26 08:46:49 -04:00
jeremystretch
f49e4ee512 Merge branch 'develop' into feature 2023-04-26 15:09:51 -04:00
jeremystretch
053be952ba Fixes #12238: Improve error message for API token IP prefix validation failures 2023-04-21 16:06:33 -04:00
Jeremy Stretch
d470848b29 Closes #12246: General cleanup of utilities modules
* Clean up base modules

* Clean up forms modules

* Clean up templatetags modules

* Replace custom simplify_decimal filter with floatformat

* Misc cleanup

* Merge ReturnURLForm into ConfirmationForm

* Clean up import statements for utilities.forms

* Fix field class references in docs
2023-04-14 10:33:53 -04:00
jeremystretch
59a6b3e71b Merge branch 'develop' into feature 2023-04-12 17:38:16 -04:00
Arthur Hanson
9e305c6181 Closes #12207: Establish a permission for creating API tokens on behalf of other users (#12192)
* 11091 add permission to allow user to create api tokens for other users

* 11091 update docs

* 11091 fix for test

* 11091 fix for test

* 11091 test case for invalid token creation

* 11091 add test for permission grant

* Cleanup & fix serializer validation

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-12 10:25:06 -04:00
jeremystretch
08017c51f6 Merge branch 'develop' into feature 2023-04-07 13:00:00 -04:00
Jeremy Stretch
2bf9acfb19 Closes #12193: Clean up tests (#12197)
* Fix skipped API tests

* Remove invalid tests

* Correct logger name
2023-04-06 16:35:27 -04:00
Arthur Hanson
ecd0c56554 Closes #9608: Move from drf-yasg to spectacular
Co-authored-by: arthanson <worldnomad@gmail.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-30 14:32:59 -04:00
Arthur Hanson
c57d71a9db 11291 optimize GraphQL queries (#11943)
* 11291 initial optimize graphql queries

* 11291 add optimizer to schemas

* 11291 cleanup fields.py

* 11291 fix fragment query
2023-03-23 08:42:18 -04:00
Jeremy Stretch
084a2cc52c Closes #9416: Dashboard widgets (#11823)
* Replace masonry with gridstack

* Initial work on dashboard widgets

* Implement function to save dashboard layout

* Define a default dashboard

* Clean up widgets

* Implement widget configuration views & forms

* Permit merging dict value with existing dict in user config

* Add widget deletion view

* Enable HTMX for widget configuration

* Implement view to add dashboard widgets

* ObjectCountsWidget: Identify models by app_label & name

* Add color customization to dashboard widgets

* Introduce Dashboard model to store user dashboard layout & config

* Clean up utility functions

* Remove hard-coded API URL

* Use fixed grid cell height

* Add modal close button

* Clean up dashboard views

* Rebuild JS
2023-02-24 16:04:00 -05:00
Jeremy Stretch
b9bd96f0c7 Closes #11765: Remove StaticSelect & StaticSelectMultiple (#11767)
* Remove StaticSelect, StaticSelectMultiple form widgets

* Tag custom ChoiceField, MultipleChoiceField classes for removal in v3.6
2023-02-19 20:09:51 -05:00
jeremystretch
5e1bb20f32 Display login message as success 2023-02-07 16:49:07 -05:00
jeremystretch
6f74c5ec03 Fixes #11528: Show edit/delete buttons in user tokens table 2023-01-25 10:09:37 -05:00
jeremystretch
064e3ff605 Merge branch 'develop' into feature 2022-12-13 17:17:05 -05:00
jeremystretch
860805ba82 Closes #10255: Introduce LOGOUT_REDIRECT_URL config parameter to control redirection of user after logout 2022-12-09 17:08:07 -05:00
jeremystretch
c3dcd8937f Merge branch 'develop' into feature 2022-11-22 10:08:23 -05:00
Arthur Hanson
de9646d096 10653 log failed login attempts on INFO (#10843)
* 10653 log failed login attempts on INFO

* 10653 use signal to log failed login attempts

* 10653 use signal to log failed login attempts

* Update netbox/users/signals.py

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

* Update netbox/users/apps.py

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-11-18 08:57:57 -05:00
jeremystretch
d4a231585a Clean up tests 2022-11-17 10:50:05 -05:00
jeremystretch
96818cacf0 #10608: Use register_model_view() for token views 2022-11-16 08:11:42 -05:00
Arthur
6eba5d4d96 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
Arthur Hanson
816fedb78d 8853 Prevent the retrieval of API tokens after creation (#10645)
* 8853 hide api token

* 8853 hide key on edit

* 8853 add key display

* 8853 cleanup html

* 8853 make token view accessible only once on POST

* Clean up display of tokens in views

* Honor ALLOW_TOKEN_RETRIEVAL in API serializer

* Add docs & tweak default setting

* Include token key when provisioning with user credentials

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-02 12:45:00 -04:00
Arthur Hanson
cc00789d35 9669 sanitize social auth usernames (#10549) 2022-10-05 11:50:47 -04:00