Compare commits

...

2829 Commits

Author SHA1 Message Date
Jon
c6976d88fd chore(api): correct pylint errors
ref: #765
2025-05-19 20:32:43 +09:30
Jon
e7242cf095 chore(api): correct pylint error W0611:unused-import
ref: #765
2025-05-18 07:02:06 +09:30
Jon
ce5e1511ff chore(settings): correct pylint error W0611:unused-import
ref: #765
2025-05-18 06:55:52 +09:30
Jon
4851dd109e chore(project_management): correct pylint error W0611:unused-import
ref: #765
2025-05-18 06:51:50 +09:30
Jon
b7b4c714bd chore(itim): correct pylint error W0611:unused-import
ref: #765
2025-05-18 06:46:10 +09:30
Jon
7137db589b chore(itam): correct pylint error W0611:unused-import
ref: #765
2025-05-18 06:35:53 +09:30
Jon
7344b5d140 chore(human_resources): correct pylint error W0611:unused-import
ref: #765
2025-05-18 06:14:47 +09:30
Jon
c9a9419663 chore(devops): correct pylint error W0611:unused-import
ref: #765
2025-05-18 06:12:45 +09:30
Jon
883260c48d chore(core): correct pylint error W0611:unused-import
ref: #765
2025-05-18 06:07:36 +09:30
Jon
02f15ecbba chore(config_management): correct pylint error W0611:unused-import
ref: #765
2025-05-18 05:50:32 +09:30
Jon
67b9a5e70d chore(centurion_feature_flag): correct pylint error W0611:unused-import
ref: #765
2025-05-18 05:48:45 +09:30
Jon
69d915079b chore(base): correct pylint error W0611:unused-import
ref: #765
2025-05-18 05:47:15 +09:30
Jon
d5b3883195 chore(assistance): correct pylint error W0611:unused-import
ref: #765
2025-05-18 05:44:44 +09:30
Jon
af4abacd53 chore(api): correct pylint error W0611:unused-import
ref: #765
2025-05-18 05:42:23 +09:30
Jon
cbd931f31a chore(accounting): correct pylint error W0611:unused-import
ref: #765
2025-05-18 05:39:50 +09:30
Jon
b9ad6c884e chore(access): correct pylint error W0611:unused-import
ref: #765
2025-05-18 05:38:33 +09:30
Jon
88264f8f10 chore(core): remove old manual migration no longer required
ref: #765
2025-05-18 05:36:59 +09:30
Jon
af0d2043ac chore(access): planning work for centurion user model, audit history and tanancy model
ref: #765 #766
2025-05-18 04:36:52 +09:30
Jon
48977aa8e1 chore(core): skeleton test cases
ref: #765 #759
2025-05-18 04:32:06 +09:30
Jon
7d2f74ce00 chore(access): planning work for centurion user model
ref: #765 #766
2025-05-18 04:20:41 +09:30
Jon
65a3effd49 refactor(access): prefetch org with tenancy object
ref: #765
2025-05-18 04:16:50 +09:30
Jon
7dcdab2e8c feat(core): permissions getter for role model
ref: #765 #551
2025-05-18 04:08:47 +09:30
Jon
46ed30a07d chore(core): skeleton test cases
ref: #765 #759
2025-05-18 04:06:12 +09:30
Jon
820da54969 feat(core): Audit History Signal for Delete/Save
ref: #765 #759
2025-05-18 04:00:53 +09:30
Jon
ef82c40555 refactor(access): Rename History models
ref: #765 #759
2025-05-18 03:38:58 +09:30
Jon
41ec865618 refactor(settings): Rename History models
ref: #765 #759
2025-05-18 03:38:21 +09:30
Jon
98b392d4a2 refactor(project_management): Rename History models
ref: #765 #759
2025-05-18 03:06:43 +09:30
Jon
4b2e55187c refactor(devops): Rename History models
ref: #765 #759
2025-05-18 02:32:08 +09:30
Jon
0894e78f9d refactor(core): Rename History models
ref: #765 #759
2025-05-18 02:26:11 +09:30
Jon
a9e16404ad refactor(accounting): Rename History models
ref: #765 #759
2025-05-18 01:37:55 +09:30
Jon
eceb220597 refactor(assistance): Rename History models
ref: #765 #759
2025-05-18 01:23:59 +09:30
Jon
7786c3844a refactor(itim): Rename History models
ref: #765 #759
2025-05-18 01:09:06 +09:30
Jon
648a414f0e feat(core): Dynamic History model creation
ref: #765 #758 #759
2025-05-17 21:06:52 +09:30
Jon
5cc08e3e94 refactor(core): Relocate history model class
ref: #765 #759
2025-05-17 04:24:11 +09:30
Jon
603d7a4b7b refactor(base): rename app to centurion
ref: #764
2025-05-16 22:10:38 +09:30
309483ea08 build: bump version 1.16.0 -> 1.17.0 2025-05-16 10:31:55 +00:00
Jon
b2bc200eb1 Merge pull request #740 from nofusscomputing/feature-next-release 2025-05-16 19:46:31 +09:30
Jon
a0ab0deb2a chore: squash migrations to reduce amount
ref: #740
2025-05-16 19:29:02 +09:30
Jon
1f9491ce73 Merge pull request #761 from nofusscomputing/new-model-access-organization 2025-05-16 03:26:34 +09:30
Jon
1663f19b2a refactor(human_resources): Update Functional ViewSet to use PyTest for Employee Model
ref: #761 #730
2025-05-16 03:10:00 +09:30
Jon
07277862cf refactor(Access): Update Functional ViewSet to use PyTest for Person Model
ref: #761 #730
2025-05-16 03:09:49 +09:30
Jon
f1016bd9cc refactor(Access): Update Functional ViewSet to use PyTest for Entity Model
ref: #761 #730
2025-05-16 03:07:57 +09:30
Jon
c39f479b96 refactor(Access): Update Functional ViewSet to use PyTest for Contact Model
ref: #761 #730
2025-05-16 03:07:46 +09:30
Jon
a4d1a2bf76 test(access): Functional ViewSet Test Suite Company model
ref: #761 #760
2025-05-16 03:07:28 +09:30
Jon
8bba04305f refactor(Access): Update Functional Permission to use PyTest for Person Model
ref: #761 #730
2025-05-16 02:18:00 +09:30
Jon
516d6fc136 refactor(Access): Update Functional Permission to use PyTest for Entity Model
ref: #761 #730
2025-05-16 02:17:52 +09:30
Jon
2e096cb495 refactor(Access): Update Functional Permission to use PyTest for Contact Model
ref: #761 #730
2025-05-16 02:17:44 +09:30
Jon
3505f915c5 refactor(Access): Update Functional Serializer to use PyTest for Contact Model
ref: #761 #730
2025-05-16 02:17:31 +09:30
Jon
254cd02649 refactor(Access): Update Functional Serializer to use PyTest for Entity Model
ref: #761 #730
2025-05-16 02:17:21 +09:30
Jon
97e37f34a1 refactor(Access): Update Functional Serializer to use PyTest for Person Model
ref: #761 #730
2025-05-16 02:17:10 +09:30
Jon
ae6b66b270 refactor(human_resources): Update Functional Serializer to use PyTest for Employee Model
ref: #761 #730
2025-05-16 02:16:57 +09:30
Jon
7a1aecebd5 refactor(human_resources): Update Functional Permissions to use PyTest for Employee Model
ref: #761 #730
2025-05-16 02:16:49 +09:30
Jon
387ffc9ade refactor(human_resources): Update Functional Metadata to use PyTest for Employee Model
ref: #761 #730
2025-05-16 02:16:38 +09:30
Jon
d0c3537753 refactor(access): Update Functional Metadata to use PyTest for Person Model
ref: #761 #730
2025-05-16 02:16:19 +09:30
Jon
eb97bfbeeb refactor(access): Update Functional Metadata to use PyTest for Entity Model
ref: #761 #730
2025-05-16 02:16:09 +09:30
Jon
7fee33999f refactor(access): Update Functional Metadata to use PyTest for Contact Model
ref: #761 #730
2025-05-16 02:15:56 +09:30
Jon
99c0e92336 test(access): Functional Serializer Test Suite Company model
ref: #761 #760
2025-05-16 02:14:50 +09:30
Jon
46494c033c test(access): Functional Permissions Test Suite Company model
ref: #761 #760
2025-05-16 02:14:34 +09:30
Jon
85986ce13e test(access): Functional MetaData Test Suite Company model
ref: #761 #760
2025-05-16 02:14:23 +09:30
Jon
bdeae5b38b test(access): ViewSet Test Suite Company model
ref: #761 #760
2025-05-15 23:07:08 +09:30
Jon
edc7aedbe0 fix(api): Dont try to access attribute if not exist in common viewset
ref: #761
2025-05-15 23:03:49 +09:30
Jon
900e03791a test(access): API field render Test Suite Company model
ref: #761 #760
2025-05-15 22:18:45 +09:30
Jon
2a977bbf47 test(access): Model Test Suite Company model
ref: #761 #760
2025-05-15 22:18:29 +09:30
Jon
d29df73d05 refactor(access): Update Model Entity to use PyTest for Model Test Suite
ref: #761 #730
2025-05-15 22:17:36 +09:30
Jon
1150e1b047 refactor(access): Update Model Contact to use PyTest for Model Test Suite
ref: #761 #730
2025-05-15 22:16:56 +09:30
Jon
cf7eeb5bde refactor(access): Update Model Person to use PyTest for Model Test Suite
ref: #761 #730
2025-05-15 22:16:45 +09:30
Jon
c2a367bd28 refactor(human_resources): Update Model Employee to use PyTest for Model Test Suite
ref: #761 #730
2025-05-15 22:15:43 +09:30
Jon
3c19e9d4cf fix(api): Dont try to access attribute if not exist in common viewset
ref: #761
2025-05-15 20:19:43 +09:30
Jon
e295e53f86 refactor(human_resources): Update Model Employee to use PyTest API Fields Render
ref: #761 #730
2025-05-15 20:03:19 +09:30
Jon
be02061b94 refactor(access): Update Model Person to use PyTest API Fields Render
ref: #761 #730
2025-05-15 20:03:02 +09:30
Jon
08dbe1e35b refactor(access): Update Model Contact to use PyTest API Fields Render
ref: #761 #730
2025-05-15 20:02:50 +09:30
Jon
8e9dca56bc refactor(access): Update Model Entity to use PyTest API Fields Render
ref: #761 #730
2025-05-15 20:02:39 +09:30
Jon
2e9fe29e99 fix(api): Correct ViewSet Sub-Model lookup
ref: #761
2025-05-15 19:45:04 +09:30
Jon
b0a6f207cd docs(user): Add Conpany page
ref: #761 #760
2025-05-15 18:40:44 +09:30
Jon
a51a79a763 feat(access): model access.Company feature flag 2025-00008
ref: #761 #760
2025-05-15 18:34:51 +09:30
Jon
b2d1903009 feat(access): URL route for model access.Company
ref: #761 #760
2025-05-15 18:34:26 +09:30
Jon
53f99f620c feat(access): Migration for model access.Company
ref: #761 #760
2025-05-15 18:34:03 +09:30
Jon
312267567f feat(access): Serializer for model access.Company
ref: #761 #760
2025-05-15 18:33:52 +09:30
Jon
34b2571a2e feat(access): New model access.Company
ref: #761 #760
2025-05-15 18:33:21 +09:30
Jon
b79874d056 chore(access): Update tenant url
ref: #761 #505
2025-05-15 17:46:57 +09:30
Jon
27e42fac56 feat(access): Organization -> Tenant Permission Migration
ref: #761 #505
2025-05-15 17:46:00 +09:30
Jon
4124d5eb38 Merge pull request #756 from nofusscomputing/2025-05-14 2025-05-15 05:37:15 +09:30
Jon
bb8c6378bc chore: Add some tests to aid in planning
ref: #756 #758
2025-05-15 04:59:06 +09:30
Jon
c3109f1894 feat(docker): Serve a robots.txt file for NO indexing
ref: #756
2025-05-15 03:58:37 +09:30
Jon
59b4b5ff39 feat(access): Organization -> Tenant Permission Migration
ref: #756 #505
2025-05-15 02:45:03 +09:30
Jon
2d7335ff85 refactor(access): Rename model Organization -> Tenant
ref: #756 #505
2025-05-15 02:44:53 +09:30
Jon
2e49de8573 refactor(settings): Update all references to User to use get_user_model()
ref: #756 closes #755
2025-05-14 19:57:56 +09:30
Jon
a4772e3c25 refactor(project_management): Update all references to User to use get_user_model()
ref: #756 #755
2025-05-14 19:40:54 +09:30
Jon
de9937606e refactor(itam): Update all references to User to use get_user_model()
ref: #756 #755
2025-05-14 19:40:44 +09:30
Jon
1b749e9f1a refactor(devops): Update all references to User to use get_user_model()
ref: #756 #755
2025-05-14 18:48:56 +09:30
Jon
f0b3748596 Merge pull request #754 from nofusscomputing/test-ticket-comment-base 2025-05-14 05:11:27 +09:30
Jon
2ea42d10e6 refactor(core): Update all references to User to use get_user_model()
ref: #754 #755
2025-05-14 04:37:38 +09:30
Jon
55cf10d289 refactor(config_management): Update all references to User to use get_user_model()
ref: #754 #755
2025-05-14 04:10:29 +09:30
Jon
09ab52b971 refactor(assistance): Update all references to User to use get_user_model()
ref: #754 #755
2025-05-14 04:04:51 +09:30
Jon
c00aa6fa73 refactor(app): Update all references to User to use get_user_model()
ref: #754 #755
2025-05-14 03:59:15 +09:30
Jon
817c8d63e1 refactor(api): Update all references to User to use get_user_model()
ref: #754 #755
2025-05-14 03:55:29 +09:30
Jon
cce885d961 refactor(accounting): Update all references to User to use get_user_model()
ref: #754 #755
2025-05-14 03:49:23 +09:30
Jon
6d92c484cd refactor(access): Update all references to User to use get_user_model()
ref: #754 #704 #755
2025-05-14 03:45:40 +09:30
Jon
f5be3b0f8e feat(base): Add var AUTH_USER_MODEL to settings
ref: #754 #704 #755
2025-05-14 03:41:00 +09:30
Jon
85afbbc01e chore(test): introduce further randomness to class fixtures so as not to create duplicate errors
ref: #754
2025-05-14 00:21:55 +09:30
Jon
e0c0c69d35 chore(test): Ensure comment cleanup during ticket tests
ref: #754 #726
2025-05-13 23:58:18 +09:30
Jon
df82650931 fix(core): Only take action on ticket comment if view exists
ref: #754 #726
2025-05-13 23:40:35 +09:30
Jon
3196006bad feat(core): Add Action comments on ticket change
ref: #754 #723
2025-05-13 23:31:08 +09:30
Jon
820755b9e0 chore(test): introduce further randomness to class fixtures so as not to create duplicate errors
ref: #754
2025-05-13 23:30:19 +09:30
Jon
1946c7aa88 fix(api): Ensure multi-nested searching for sub-models works
ref: #754
2025-05-13 23:29:02 +09:30
Jon
7c35a2d427 test(core): Unit viewset Test Cases for TicketCommentAction model
ref: #754 #736
2025-05-13 19:52:04 +09:30
Jon
c4ee706591 test(core): Unit model Test Cases for TicketCommentAction model
ref: #754 #736
2025-05-13 19:51:39 +09:30
Jon
4ee5f349f0 test(core): Unit API Render Test Cases for TicketCommentAction model
ref: #754 #736
2025-05-13 19:51:29 +09:30
Jon
21a1974ba1 test(core): Interim Functional model Test Case TicketCommentAction
ref: #754 #736
2025-05-13 19:50:51 +09:30
Jon
969b4d22fc feat(core): Remove add, change and delete permissions for model TicketCommentAction from permission selector
ref: #754 #736
2025-05-13 19:42:31 +09:30
Jon
6169324ffd feat(core): Serializer for model TicketCommentAction
ref: #754 #736
2025-05-13 19:22:00 +09:30
Jon
003cad1f58 feat(core): Migrations for model TicketCommentAction
ref: #754 #736
2025-05-13 19:19:23 +09:30
Jon
c8df4b21a0 feat(core): New model TicketCommentAction
ref: #754 #736
2025-05-13 19:19:10 +09:30
Jon
7f49fb2d0e feat(core): Setup serializer to meet requirements
ref: #754 #726
2025-05-13 18:58:18 +09:30
Jon
1cb028c273 feat(core): Setup model to meet requirements
ref: #754 #726
2025-05-12 20:11:01 +09:30
Jon
4ad6c10a64 chore(core): Remove commented code
ref: #754 #726
2025-05-12 20:10:28 +09:30
Jon
899df95994 feat(api): Add exception logging to ViewSetCommon
ref: #754 #752
2025-05-12 19:55:37 +09:30
Jon
0fa7ffa34a chore: correct dev log path to be <app root>/log
ref: #754
2025-05-12 19:36:08 +09:30
Jon
c46a597828 Merge pull request #753 from nofusscomputing/test-ticket-base-model 2025-05-12 06:46:17 +09:30
Jon
764f1b20d9 test(core): Ensure that a ticket milestone comes from the same assigned project
ref: #744 #723
2025-05-12 05:26:02 +09:30
Jon
01b4a681da test(core): SKIP Tests TicketBase Description Slash command Checks
Required until the slash commands comment creation uses the new ticketcommentbase model.

ref: #744 #723 #564 #746 #747
2025-05-12 04:07:19 +09:30
Jon
16299d480e test(core): TicketBase Description Slash command Checks
ref: #744 #723
2025-05-12 04:05:53 +09:30
Jon
b0cb9f6fd0 chore(test): Add global support not to generate tests that are marked skip or class skip
ref: #753 #739
2025-05-12 04:04:32 +09:30
Jon
5b133c951d chore(test): Add a global fixture to simulate a viewset
ref: #753 #723 #730
2025-05-12 02:53:19 +09:30
Jon
e29a7ec0e2 test(core): TicketBase Remaining Serializer Chacks
ref: #753 #723
2025-05-12 02:52:34 +09:30
Jon
e7213d8a70 Merge pull request #744 from nofusscomputing/test-ticket-comment-base 2025-05-11 02:31:54 +09:30
Jon
4d7510ad3a feat(python): Upgrade DRF Spectacular 0.27.2 -> 0.28.0
ref: #744
2025-05-11 01:48:46 +09:30
Jon
d8ef918a67 feat(python): Upgrade DRF 3.15.2 -> 3.16.0
ref: #744
2025-05-11 01:41:30 +09:30
Jon
cb49d0fbf7 feat(core): When processing slash command duration, cater for new ticket models
ref: #744 #728 #726 #746 #747
2025-05-10 23:42:40 +09:30
Jon
70c835eb93 test(core): Partial functional Model Test Suite covering some slash commande for TicketCommentSolution
ref: #744 #728
2025-05-10 23:40:41 +09:30
Jon
40b51f1a77 feat(api): Add Logging function to Common ViewSet
ref: #744 #436 #752
2025-05-10 23:39:22 +09:30
Jon
1bff76c637 feat(access): Add Logging function to Tenancy model
ref: #744 #436 #752
2025-05-10 23:38:58 +09:30
Jon
24b6bcfa47 feat(base): Enable user to customize log file location
ref: #744 #436 #752
2025-05-10 23:37:54 +09:30
Jon
b22baefa5a test(core): ensure ticket is un-solved for ticketcomment unit api render fields check
ref: #744 #726
2025-05-10 17:27:27 +09:30
Jon
a6e0f4e728 test(core): ensure slash command is called on ticket comment
ref: #744 #726
2025-05-10 17:23:37 +09:30
Jon
e366220e8b fix(core): ensure slash command is called on ticket description
ref: #744 #723
2025-05-10 16:42:23 +09:30
Jon
f71e304731 test(core): Unit ViewSet Test Suite for TicketCommentSolution
ref: #744 #728
2025-05-10 15:24:50 +09:30
Jon
55f58bb689 test(core): Unit ViewSet Test Suite for TicketCommentBase
ref: #744 #726
2025-05-10 15:24:27 +09:30
Jon
03b752759f test(core): Skip Related slash command checks until migrating tickets to new model
ref: #744 #746
2025-05-10 14:34:39 +09:30
Jon
85c6ed8483 test(core): Add ability to unit api field rendering test case for second api request if required
ref: #744 #726
2025-05-10 13:26:22 +09:30
Jon
a081c6a371 test(core): Partial Functional Model test cases (Slash Commands) for TicketCommentBase
ref: #744 #726
2025-05-09 21:05:54 +09:30
Jon
6c3122a3d8 test(core): Functional Model test cases (Slash Commands) for TicketBaseModel
ref: #744 #723
2025-05-09 21:04:31 +09:30
Jon
0c80b87606 test(core): Partial Slash Command re-write
ref: #744 #730
2025-05-09 21:03:44 +09:30
Jon
b6da539fcd fix(core): Spent slash command is valid for time spent
ref: #744
2025-05-09 21:02:55 +09:30
Jon
d4d99772b9 test(core): correct field so its valid for unit TicketCommentBase model
ref: #744 #726
2025-05-09 20:42:16 +09:30
Jon
4f8be43527 test(core): Unit API Fields Render for TicketCommentSolution model
ref: #744 #728
2025-05-09 20:41:26 +09:30
Jon
eb2282efac test(core): Unit API Fields Render for TicketCommentBase model
ref: #744 #726
2025-05-09 20:40:45 +09:30
Jon
85b5bf7b58 feat(core): Do validate the comment_type field for TicketCommentBase
ref: #744 #726
2025-05-09 20:08:06 +09:30
Jon
626a5ccb11 refactor(access): when fetching parent object, use the parent_model get function
ref: #744
2025-05-09 20:06:45 +09:30
Jon
806ffb2754 chore(python): upgrade django 5.1.8 -> 5.1.9
ref: #744
2025-05-09 16:25:33 +09:30
Jon
5900c13e08 docs(development): Add initial TicketCommentBase
ref: #744 #726
2025-05-09 16:21:42 +09:30
Jon
d399698eb1 test(core): Unit Model assert save and call are called for TicketBase
ref: #744 #723
2025-05-09 16:20:44 +09:30
Jon
457d329b0b fix(core): Correct logic for TicketCommentSolution
ref: #744 #728
2025-05-09 16:19:57 +09:30
Jon
45c428d30a fix(core): Correct logic for TicketCommentBase
ref: #744 #726
2025-05-09 16:19:33 +09:30
Jon
7ddb72239e chore(python): Add testing dep pytest-mock
ref: #744
2025-05-09 16:13:38 +09:30
Jon
580820ef44 test(core): Unit Model Checks for TicketCommentSolution
ref: #744 #728
2025-05-09 16:11:59 +09:30
Jon
d037150eb3 test(core): Unit Model Checks for TicketCommentBase
ref: #744 #726
2025-05-09 16:10:45 +09:30
Jon
35a102e4a9 Merge pull request #742 from nofusscomputing/test-asset-base 2025-05-08 15:44:35 +09:30
Jon
f7c75df9be docs(itam): Add IT Asset
ref: #742 closes #692
2025-05-08 15:30:11 +09:30
Jon
d0e18fe75a docs(development): Add Asset
ref: #742 closes #737
2025-05-08 15:29:59 +09:30
Jon
e30c08fd5b test(itam): test meta attribute itam_sub_model_type for ITAMBaseModel
ref: #742 #692
2025-05-08 15:10:38 +09:30
Jon
1058659174 test(itam): Dont use constants where variables should be used
ref: #742
2025-05-08 14:54:03 +09:30
Jon
b9ac588f87 test(itam): Remaining Unit Model test cases for AssetBase
ref: #742 #692
2025-05-08 14:54:03 +09:30
Jon
40b4bb0a3e test(accounting): Remaining Unit Model test cases for AssetBase
ref: #742 #737
2025-05-08 14:54:03 +09:30
Jon
9bd9652b3d fix(accounting): Ensure correct sub-model check is conducted within model type
ref: #742 #737
2025-05-08 14:47:56 +09:30
Jon
46c4fe9516 fix(itam): ensure RO field asset_type is set
ref: #742 #692
2025-05-08 14:25:47 +09:30
Jon
a71b5e6aba test(itam): Functional ViewSet Test Cases for ITAMAssetBase
ref: #742 #692
2025-05-08 13:42:24 +09:30
Jon
e0cbf1447f test(itam): Functional Serializer Test Cases for ITAMAssetBase
ref: #742 #692
2025-05-08 13:42:06 +09:30
Jon
b69e54f1e9 test(itam): Functional Permissions Test Cases for ITAMAssetBase
ref: #742 #692
2025-05-08 13:41:56 +09:30
Jon
ecb1c21179 test(itam): Functional Metadata Test Cases for ITAMAssetBase
ref: #742 #692
2025-05-08 13:41:49 +09:30
Jon
acff19ad58 test(itam): Functional History Test Cases for ITAMAssetBase
ref: #742 #692
2025-05-08 13:41:41 +09:30
Jon
f79f796a14 test(accounting): Functional ViewSet Test Cases for AssetBase
ref: #742 #737
2025-05-08 13:40:59 +09:30
Jon
a08a43e2bd test(accounting): Functional Serializer Test Cases for AssetBase
ref: #742 #737
2025-05-08 13:40:51 +09:30
Jon
8238e97a45 test(accounting): Functional Permissions Test Cases for AssetBase
ref: #742 #737
2025-05-08 13:40:44 +09:30
Jon
88202b57ee test(accounting): Functional Metadata Test Cases for AssetBase
ref: #742 #737
2025-05-08 13:40:36 +09:30
Jon
324fa39b56 test(accounting): History Test Cases for AssetBase
ref: #742 #737
2025-05-08 13:40:23 +09:30
Jon
233393e853 test: add missing merge of add_data for api permissions tests
ref: #742 #730
2025-05-08 13:38:56 +09:30
Jon
84afc3274a test: remove ticket only vars from api permissions tests
ref: #742 #730
2025-05-08 12:28:19 +09:30
Jon
a5bfc4977d Merge pull request #741 from nofusscomputing/base-asset-model 2025-05-06 04:20:14 +09:30
Jon
19205bbe8b feat(itam): Add Feature Flag 2025-00007 ITAMAssetBase
ref: #741 #692
2025-05-06 03:58:29 +09:30
Jon
f144e0b8ef feat(itam): Add endpoint for ITAMAssetBase
ref: #741 #692
2025-05-06 03:58:01 +09:30
Jon
8473d00148 feat: Model tag migration for Asset and IT Asset
ref: #741 #737 #692
2025-05-06 02:09:44 +09:30
Jon
c8391caf07 feat(itam): Model tag for ITAsset
ref: #741 #692
2025-05-06 02:08:17 +09:30
Jon
d19bb3a204 feat(accounting): Model tag for Asset
ref: #741 #737
2025-05-06 02:07:38 +09:30
Jon
ed71e935fc test(api): dont use constants for variable data
ref: #741
2025-05-06 01:43:38 +09:30
Jon
5ba243a1ea test: correct viewset tests
ref: #741
2025-05-06 00:48:29 +09:30
Jon
88a30650a5 test(itam): Unit Viewset checks for AssetBase Model
ref: #741 #692
2025-05-05 22:10:50 +09:30
Jon
420b223ca4 test(core): Add missing fields is_global checks for ticket base
ref: #741 #723
2025-05-05 22:08:42 +09:30
Jon
7168d519d1 test(api): Add submodel url resolution for metadata
ref: #741
2025-05-05 22:07:56 +09:30
Jon
4a09463f0a test(itam): Unit API Fields checks for ITAM AssetBase Model
ref: #741 #692
2025-05-05 20:45:30 +09:30
Jon
0a52029840 test(accounting): Unit API Fields checks for AssetBase Model
ref: #741 #737
2025-05-05 20:44:56 +09:30
Jon
6841b30a77 test: Support variables that were defined as properties.
ref: #741
2025-05-05 20:34:23 +09:30
Jon
dbaff89b8d test(api): Ensure that model notes is added to model create for api field tests
ref: #741
2025-05-05 17:49:17 +09:30
Jon
b7cd9ea75c fix(itim): Ensure that itam base model is always imported
ref: #741 #692
2025-05-05 17:33:30 +09:30
Jon
b54f3b7ab4 refactor(api): Limit url pk regex to ensure the value is a number
ref: #741
2025-05-05 17:22:08 +09:30
Jon
83d7c38c38 docs(accounting): added interim
ref: #741 #737
2025-05-05 16:58:44 +09:30
Jon
644dbc8159 feat(accounting): Add app label to kb articles for notes
ref: #741 #737
2025-05-05 16:38:41 +09:30
Jon
e566a5edf1 chore: add link to issue template for clarity of sub-model history variables
ref: #741
2025-05-05 16:35:03 +09:30
Jon
ef5c6b73af feat(accounting): Migrations for notes model for AssetBase
ref: #741 #737
2025-05-05 16:24:34 +09:30
Jon
3d7b133005 feat(accounting): Migrations for history model for AssetBase
ref: #741 #737
2025-05-05 16:24:24 +09:30
Jon
37a18d3c6e feat(accounting): Notes Viewset for AssetBase
ref: #741 #737
2025-05-05 16:24:00 +09:30
Jon
d6290471ba feat(accounting): Notes Serializer for AssetBase
ref: #741 #737
2025-05-05 16:23:33 +09:30
Jon
c13b360ca5 feat(accounting): Notes model for AssetBase
ref: #741 #737
2025-05-05 16:23:14 +09:30
Jon
e5cb0261ba feat(accounting): History model for AssetBase
ref: #741 #737
2025-05-05 16:22:48 +09:30
Jon
6c91cb008c chore(itam): just add this fucking thing cause vscode is a cunt and wont pick up the test correctly as its using an old value that does not exist even though the fucking code works directly from the console via pytest.
ref: #741 #692
2025-05-05 04:56:30 +09:30
Jon
9561301500 test(accounting): Unit Viewset checks for AssetBase Model
ref: #741 #737
2025-05-05 04:21:45 +09:30
Jon
349d67fa7b test(itam): Unit Model checks for ITAMAssetBase Model
ref: #741 #692
2025-05-05 02:46:41 +09:30
Jon
ce64664447 test(base): update Model base test suite for model_notes field
ref: #741 #737
2025-05-05 02:45:19 +09:30
Jon
370b8cd40f test(accounting): Unit Model checks for AssetBase Model
ref: #741 #737
2025-05-05 02:43:09 +09:30
Jon
efde919689 feat(itam): Serializer for ITAssetBase
ref: #741 #692
2025-05-05 01:00:14 +09:30
Jon
9a88b75654 feat(itam): Migrations for ITAssetBase
ref: #741 #692
2025-05-05 00:59:51 +09:30
Jon
0ceab03334 feat(itam): Add Model ITAssetBase
ref: #741 #692
2025-05-05 00:59:23 +09:30
Jon
c8cec06d85 feat(accounting): Viewset for Assets
ref: #741 #737
2025-05-05 00:58:08 +09:30
Jon
018cd7d245 feat(accounting): Serializer for model AssetBase
ref: #741 #737
2025-05-05 00:58:08 +09:30
Jon
471b5c08f6 feat(accounting): Migrations for model AssetBase
ref: #741 #737
2025-05-05 00:58:08 +09:30
Jon
b11a978962 feat(accounting): Add Model AssetBase
ref: #741 #737
2025-05-05 00:58:08 +09:30
Jon
95aba2b44b chore(accounting): Add permissions to permissions selector
ref: #741 #737
2025-05-05 00:58:08 +09:30
Jon
5d6d0e95ec chore(accounting): Add viewsets directory
ref: #741 #737
2025-05-05 00:58:08 +09:30
Jon
f0f75ecaa8 chore(accounting): Add models directory
ref: #740 #737
2025-05-04 21:16:29 +09:30
975a71bdd6 build: bump version 1.15.1 -> 1.16.0 2025-05-04 10:50:45 +00:00
Jon
f9e59835c1 Merge pull request #718 from nofusscomputing/feature-next-release 2025-05-04 20:01:58 +09:30
Jon
6ea66f7379 chore: squash migrations
ref: #718
2025-05-04 19:48:15 +09:30
Jon
fb768d1432 Merge pull request #734 from nofusscomputing/test-ticket-model 2025-05-04 03:30:01 +09:30
Jon
baa61155f7 test(core): Serializer Validation for ticket status change for TicketBase model
ref: #734 #723
2025-05-04 03:04:16 +09:30
Jon
c773fbc3a5 test(core): Prevent Closing / Solving of TicketBase Model if not ready
ref: #734 #723 closes #325
2025-05-04 03:04:09 +09:30
Jon
8c84ff7c52 test(itim): Incomplete Model Unit Tests for RequestTicket
ref: #734 #725
2025-05-03 22:56:09 +09:30
Jon
85d4cc8220 test(itim): Incomplete Model Unit Tests for SLMTicketBase
ref: #734 #727
2025-05-03 22:55:14 +09:30
Jon
70a2d502ef test(core): Incomplete Model Unit Tests for TicketBase
ref: #734 #723
2025-05-03 22:53:52 +09:30
Jon
393c8ce0ce refactor(test): rewrite model unit tests to use PyTest
ref: #734 #729 #735
2025-05-03 22:48:14 +09:30
Jon
92bc4aec43 fix(test): correct typo in attribute parameterized_
ref: #734 #729
2025-05-03 04:51:02 +09:30
Jon
4c46681d39 Merge pull request #733 from nofusscomputing/test-ticket-models 2025-05-01 01:42:47 +09:30
Jon
a898549469 test(itim): RequestTicket Updated, yet incomplete Test Suite for Serializer
ref: #733 #725
2025-05-01 01:23:40 +09:30
Jon
4e75faafb8 test(itim): SLMTicketBase Updated, yet incomplete Test Suite for Serializer
ref: #733 #727
2025-05-01 01:23:18 +09:30
Jon
1718a1cf14 test(core): TicketBase Updated, yet incomplete Test Suite for Serializer
ref: #733 #723
2025-05-01 01:22:42 +09:30
Jon
64757826da refactor(test): Update test parameterization
ref: #733 #730 #729
2025-05-01 01:22:22 +09:30
Jon
927776b9a7 chore(test): update pytest and required components
ref: #733
2025-05-01 00:40:06 +09:30
Jon
4ea5ddf122 test: Correct Test Suite for Serializer for models TicketBase, TicketRequest and TicketSLM
ref: #733 #723 #725 #727
2025-04-29 17:20:07 +09:30
Jon
847a5550e8 test(itim): RequestTicket Initial Test Suite for Serializer
ref: #733 #725
2025-04-29 16:14:40 +09:30
Jon
ea38665dab test(itim): SLMTicket Initial Test Suite for Serializer
ref: #733 #727
2025-04-29 16:13:59 +09:30
Jon
440adc09f4 test(core): TicketBase Initial Test Suite for Serializer
ref: #733 #723
2025-04-29 16:13:12 +09:30
Jon
9fcb1a8a44 test(core): SLMTicket Test Suite for ViewSet
ref: #733 #727
2025-04-29 15:59:45 +09:30
Jon
22808cf6c8 test(core): SLMTicket Test Suite for Metadata
ref: #733 #727
2025-04-29 15:59:37 +09:30
Jon
f978839ccc test(core): Request Test Suite for ViewSet
ref: #733 #725
2025-04-29 15:59:07 +09:30
Jon
54af17d75a test(core): Request Test Suite for Metadata
ref: #733 #725
2025-04-29 15:58:57 +09:30
Jon
c7eef1a97c test(core): TicketBase Test Suite for ViewSet
ref: #733 #723
2025-04-29 15:58:29 +09:30
Jon
59741e4197 test(core): TicketBase Test Suite for Metadata
ref: #733 #723
2025-04-29 15:58:05 +09:30
Jon
2518873e23 test(api): update test cases for SubModelViewSet Base Test Class
base class returns different results to inherited class.

ref: #733
2025-04-29 15:52:11 +09:30
Jon
029ab6bc06 refactor(api): SubModelViewSet must inherit from ModelViewSet as it's an extension
ref: #733 #564
2025-04-26 18:05:43 +09:30
Jon
a583db4b65 test(itim): RequestTicket ViewSet Test Suite
ref: #733 #723
2025-04-26 18:04:46 +09:30
Jon
9f8789f390 test(core): TicketBase ViewSet Test Suite
ref: #733 #723
2025-04-26 18:04:22 +09:30
Jon
c0b27c2886 test(api): Incomplete SubModelViewSet Test Cases
ref: #733 #564
2025-04-26 18:03:31 +09:30
Jon
cdacb19c30 test(api): SubModelViewSet Test Suite Setup
ref: #733 #564
2025-04-26 16:45:22 +09:30
Jon
471a1249c0 Merge pull request #732 from nofusscomputing/new-model-ticket-comment-base 2025-04-26 09:09:43 +09:30
Jon
53abf219a3 test: correct tests from Meta.sub_model_type changes
ref: #732
2025-04-26 08:40:29 +09:30
Jon
51c238734a chore(docs): Update issue template - New Model
ref: #732
2025-04-26 07:56:44 +09:30
Jon
efb0f52e8a chore(docs): correct linting errors
ref: #732
2025-04-26 07:48:02 +09:30
Jon
39dc8ad39f feat(core): Add ViewSet for Ticket Comments
ref: #732 #726
2025-04-26 07:38:55 +09:30
Jon
db47d0e160 feat(project_management): Depreciate Project Task Ticket Endpoint
ref: #732 #564
2025-04-26 07:38:10 +09:30
Jon
da13343b27 feat(itim): Depreciate Problem Ticket Endpoint
ref: #732 #564
2025-04-26 07:37:24 +09:30
Jon
8100030870 feat(itim): Depreciate Incident Ticket Endpoint
ref: #732 #564
2025-04-26 07:37:04 +09:30
Jon
5097db6f94 feat(itim): Depreciate Change Ticket Endpoint
ref: #732 #564
2025-04-26 07:36:01 +09:30
Jon
b729842a1c feat(assistance): Depreciate Ticket Comment
ref: #732 #564 #726
2025-04-26 07:34:55 +09:30
Jon
bc1d5ffc03 feat(assistance): Depreciate Request Ticket Endpoint
ref: #732 #564 #725
2025-04-26 07:33:45 +09:30
Jon
ae1f600147 feat(core): Add routes for Ticket Comments
ref: #732 #726
2025-04-26 07:28:25 +09:30
Jon
edc3f9fd3c feat(core): update ticket serializer to use new comment base url
ref: #732 #723
2025-04-26 07:11:12 +09:30
Jon
8dc922a8bb feat(core): Add permissions import, purge and triage to model TicketCommentSolution
ref: #732 #728
2025-04-26 07:10:18 +09:30
Jon
9461cdaf9d feat(core): Add permissions import, purge and triage to model TicketCommentBase
ref: #732 #726
2025-04-26 07:09:33 +09:30
Jon
a923a21660 feat(core): Filter ticket_comment_model routes to those defined in Meta.sub_model_type
ref: #732 #726
2025-04-26 06:56:31 +09:30
Jon
dcd60a5152 feat(core): Filter ticket_model routes to those defined in Meta.sub_model_type
ref: #732 #723
2025-04-26 06:55:54 +09:30
Jon
50882a4732 feat(access): Filter entity_model routes to thos defined in Meta.sub_model_type
ref: #732 #704
2025-04-26 06:53:58 +09:30
Jon
9cd59e8446 feat(core): Serializer for TicketCommentBase
ref: #732 #726
2025-04-26 06:34:58 +09:30
Jon
9905edc28c feat(core): Serializer for TicketCommentSolution
ref: #732 #728
2025-04-26 06:34:12 +09:30
Jon
98479f39e6 feat(core): Ticket Comment Get URL functions
ref: #732 #726
2025-04-26 06:28:18 +09:30
Jon
bdfd3f42c4 feat(core): Ticket Comment Validation for comment_type
must be derived from `Meta.sub_model_type`

ref: #732 #726
2025-04-26 06:27:36 +09:30
Jon
ca022e0697 fix(core): Ticktet comment can have empty body
i.e. time tracking

ref: #732 #726
2025-04-26 06:26:31 +09:30
Jon
1719b6c417 feat(core): Update choices fields for TicketCommentBase model
ref: #732 #726
2025-04-26 06:25:31 +09:30
Jon
bb0f9b56e6 feat(core): init for model TicketCommentSolution
ref: #732 #728
2025-04-26 06:24:00 +09:30
Jon
107a3aa17f feat(core): Migrations for choice fields for TicketBase model
ref: #732 #723
2025-04-26 06:23:33 +09:30
Jon
1c9be27e1f feat(core): Migrations for model TicketCommentSolution
ref: #732 #728
2025-04-26 06:23:07 +09:30
Jon
dc25d483fc feat(core): Update choice fields for TicketBase model
ref: #732 #723
2025-04-26 06:22:25 +09:30
Jon
33362a28d5 feat(core): New model TicketCommentSolution
ref: #732 #728
2025-04-26 06:21:04 +09:30
Jon
b476bd458e fix(core): If model does not save history, dont attempt to cache before
ref: #732
2025-04-26 06:19:35 +09:30
Jon
c152dd13f1 feat(api): when fetching related_object, default to base_model for SubModelViewSet
ref: #732 #726
2025-04-26 06:13:39 +09:30
Jon
677cc55e04 test: correct serializer imports from recent file renames
ref: #732 #726
2025-04-26 06:08:37 +09:30
Jon
b6146b7d14 feat: Add field Meta.sub_model_type to sub-models
ref: #732 #564
2025-04-26 06:00:34 +09:30
Jon
dbc849d3f1 chore(core): rename viewsets/ticket_comment.py -> viewsets/ticket_comment_depreciated.py
ref: #732 #726
2025-04-26 05:49:19 +09:30
Jon
8d1098ec9e fix(itam): provide return_url as part of software version meta
ref: #718
2025-04-25 17:01:52 +09:30
Jon
63923e8a9b Merge pull request #731 from nofusscomputing/refactor-test-api 2025-04-24 13:22:54 +09:30
Jon
7261f60e3b chore(docs): correct linting error
ref: #731
2025-04-24 13:09:00 +09:30
Jon
fef14b8be8 feat(core): New interim model TicketCommentSolution
ref: #731 #728
2025-04-24 12:44:25 +09:30
Jon
17e4cb4148 docs(development): update testing docs
ref: #731 #730
2025-04-24 12:42:00 +09:30
Jon
99211b7505 test: Fixture for creating model with random data
ref: #731 #730
2025-04-24 12:41:16 +09:30
Jon
c4e81ffbed test(itim): API Field checks for TicketSLMBase
ref: #731 #727
2025-04-24 12:36:45 +09:30
Jon
683b134053 test(itim): API Field checks for TicketRequest
ref: #731 #725
2025-04-24 12:36:09 +09:30
Jon
2a5c86d961 fix(itim): correct ticket_slm serializer
ref: #731 #727
2025-04-23 18:58:13 +09:30
Jon
ca28a67194 fix(itim): correct ticket_request serializer
ref: #731 #725
2025-04-23 18:57:41 +09:30
Jon
d904ce7100 chore: migrate app/.coveragerc to -> pyproject.toml
ref: #731
2025-04-23 18:33:35 +09:30
Jon
daf30de835 chore: correct tests so they function and cleanup correctly
ref: #731
2025-04-23 18:33:10 +09:30
Jon
7c9819efd1 test(core): API fields Tests for TicketBase
ref: #731 #723
2025-04-22 23:57:19 +09:30
Jon
42bea64ff5 test(core): API fields Unit Test Suite
ref: #731 #730
2025-04-22 22:25:23 +09:30
Jon
537f167b9e test(core): Correct model notes test suite
ref: #731
2025-04-22 22:22:58 +09:30
Jon
0a630cf51a test(core): API Permission Test Cases for ticket_base model
ref: #731 #723
2025-04-22 22:21:42 +09:30
Jon
29e07e6cac feat(core): add ticket routes
ref: #731 #723
2025-04-22 22:18:40 +09:30
Jon
0f21f8daf0 test(api): add API Permission Test Cases
ref: #731 #730
2025-04-22 22:17:32 +09:30
Jon
6289fad8ad chore: migrate from pytest.ini -> pyproject.toml
ref: #731 #730
2025-04-22 21:44:05 +09:30
Jon
705b245514 chore: add pytest to pyproject.toml
ref: #731
2025-04-20 01:21:10 +09:30
Jon
9e1a426240 Merge pull request #724 from nofusscomputing/refactor-core-model-ticket 2025-04-19 20:38:03 +09:30
Jon
c80a5b5232 docs(development): initial ticket docs
ref: #724 #564 #723
2025-04-16 21:10:59 +09:30
Jon
eddd2534ea fix(api): SubModelViewSet.related_objects must be the same class as the base model
ref: #724 #723 #725
2025-04-16 21:07:14 +09:30
Jon
9dc1ae2d05 feat(itim): serializer for SLMTicketBase
ref: #724 #727
2025-04-16 21:05:32 +09:30
Jon
4b8cb9633e feat(itim): Serializer for RequestTicket
ref: #724 #725
2025-04-16 21:05:15 +09:30
Jon
8016c4b4c8 feat(itim): migrations for RequestTicket
ref: #724 #725
2025-04-16 21:05:00 +09:30
Jon
3efadfa75f feat(itim): New Model RequestTicket
ref: #724 #725
2025-04-16 21:04:45 +09:30
Jon
66bbace8be feat(itim): migration for SLMTicketBase
ref: #724 #727
2025-04-16 21:03:54 +09:30
Jon
7ff638ed58 feat(itim): New Model SLMTicketBase
ref: #724 #727
2025-04-16 21:02:10 +09:30
Jon
ddebf50e88 feat(core): migrations for TicketCommentBase
ref: #724 #726
2025-04-16 21:01:22 +09:30
Jon
64144ea76f feat(core): New Model TicketCommentBase
ref: #724 #726
2025-04-16 21:01:09 +09:30
Jon
633df58964 feat(core): viewset for TicketBase
ref: #724 #723
2025-04-16 21:00:15 +09:30
Jon
f280f408ee feat(core): serializer for TicketBase
ref: #724 #723
2025-04-16 21:00:01 +09:30
Jon
d1715f4457 feat(core): migrations for TicketBase
ref: #724 #723
2025-04-16 20:59:50 +09:30
Jon
e80647ffd1 feat(core): New Model TicketBase
ref: #724 #723
2025-04-16 20:59:36 +09:30
Jon
1a5f328a24 fix(access): Ensure related model is a sub-model
ref: #724 #723
2025-04-16 20:54:30 +09:30
Jon
4872c6d1c8 refactor(core): rename ticket model filename in preparation for base ticket model
ref: #724 #723
2025-04-16 00:38:15 +09:30
Jon
a695b4563d refactor(access): migrate sub-model viewset logic to common
ref: #724 #723
2025-04-15 20:13:39 +09:30
Jon
b89993f89d Merge pull request #722 from nofusscomputing/model-employee 2025-04-15 17:27:30 +09:30
Jon
8f69e6ec79 test(access): Correct history link test cases
ref: #722 #684
2025-04-15 17:09:38 +09:30
Jon
8984aeebb8 test(project_management): Add test cases for api field render for model fields estimation_project and duration_project
ref: #722 closes #312
2025-04-15 16:47:02 +09:30
Jon
a0d750b1f5 feat(project_management): add estimation field to project api fields
ref: #722 closes #312
2025-04-15 16:44:23 +09:30
Jon
75618de977 refactor(project_management): add duration field to project api fields
ref: #722 #312
2025-04-15 16:41:07 +09:30
Jon
2e1358da83 fix(human_resources): Correct history link generation and add docs
ref: #722 #707 fixes #710
2025-04-15 16:20:12 +09:30
Jon
8ecb1fe01a fix(human_resources): Correct history link generation
ref: #722 #684
2025-04-15 16:17:33 +09:30
Jon
0ff8f8650b refactor(human_resources): Move employee details to its own section
ref: #722 #684
2025-04-15 15:46:06 +09:30
Jon
529a7fa385 chore(human_resources): add employee to feature flag 2025-00005
ref: #722 #684 #92
2025-04-15 15:45:43 +09:30
Jon
6258fb2a33 chore(release_notes): add employee note to release notes
ref: #722 closes #684
2025-04-15 15:26:45 +09:30
Jon
0a2ede62b7 test(human_resources): History Serializer and ViewSet Functional test suites for employee
ref: #722 #684
2025-04-15 15:23:35 +09:30
Jon
559e65f990 test(human_resources): APIv2, History, Model and ViewSet Unit test suites for employee
ref: #722 #684
2025-04-15 15:22:56 +09:30
Jon
e71f7a6942 feat(human_resources): nav menu entries for Employee
ref: #722 #684
2025-04-15 15:22:09 +09:30
Jon
f12a2e37f3 feat(human_resources): Serializer for Employee
ref: #722 #684
2025-04-15 15:21:24 +09:30
Jon
c1614b1182 feat(human_resources): Migration for Employee
ref: #722 #684
2025-04-15 15:21:08 +09:30
Jon
6b4bd4db35 feat(human_resources): New model Employee
ref: #722 #684
2025-04-15 15:20:48 +09:30
Jon
163d7bcd6c feat(devops): add missing api index menu entry for devops
ref: #722
2025-04-15 15:09:34 +09:30
Jon
d131d2499b feat(access): add missing nav menu entries for entities
ref: #722
2025-04-15 15:08:38 +09:30
Jon
4e03c2bf31 feat(human_resources): add module to perms selector
ref: #722
2025-04-15 15:07:50 +09:30
Jon
9e05410f28 Merge pull request #719 from nofusscomputing/test-tenancy-model 2025-04-13 16:50:30 +09:30
Jon
9c88c23bb3 test: Migrate models to use refactored model tests
ref: #719 closes #708
2025-04-13 16:35:48 +09:30
Jon
e4588771e8 test: Consolidate All model tests to remove duplicates and to simplify
ref: #719 #708
2025-04-13 13:48:54 +09:30
Jon
507c42faea chore: Add branch coverage to makefile test
ref: #719 #708
2025-04-12 19:04:11 +09:30
Jon
9302627c6f fix(access): add missing attribute to Tenancy object
ref: #718
2025-04-12 19:01:44 +09:30
04780767c0 build: bump version 1.15.0 -> 1.15.1 2025-04-10 05:12:45 +00:00
Jon
2d8275d2af fix(python): Downgrade django 5.2 -> 5.1.8
5.2 removes support for postgres 13

ref: #717
2025-04-10 14:20:27 +09:30
db25eabfdd build: bump version 1.14.0 -> 1.15.0 2025-04-10 03:21:54 +00:00
Jon
71bfb5b9e4 Merge pull request #702 from nofusscomputing/feature-next-release 2025-04-10 12:24:17 +09:30
Jon
3146417001 chore: update release notes
ref: #702
2025-04-10 12:09:41 +09:30
Jon
32d97932d1 chore: squash migrations
reduces the amount required

ref: #702
2025-04-10 12:05:43 +09:30
Jon
32251d0a08 fix(api): Correct documentation link to use models verbose name
ref: #702
2025-04-09 14:41:10 +09:30
Jon
b694df0330 test(settings): Correct nav menu entry for Ticket Category and Ticket Comment Category
ref: #702 #565 #566
2025-04-09 13:59:05 +09:30
Jon
52ffb58276 feat(settings): Move Ticket Comment Category from settings to ITOps menu
ref: #702 closes #566
2025-04-09 13:38:03 +09:30
Jon
9ebc65f3b3 feat(settings): Move Ticket Category from settings to ITOps menu
ref: #702 closes #565
2025-04-09 13:37:27 +09:30
Jon
bdc4066a17 chore(accounting): add feature Flag 2025-00004 to settings ready for use
ref: #702 #714
2025-04-09 12:35:16 +09:30
Jon
ee018802a9 feat(access): place roles nav behind feature flag 2025-00003
ref: #702 #551
2025-04-09 12:31:47 +09:30
Jon
d4221913d2 feat(access): place directory nav behind feature flag 2025-00002
ref: #702 #704
2025-04-09 12:31:00 +09:30
Jon
ab4ebdab24 feat(accounting): add new module
ref: #702 closes #714
2025-04-09 12:28:54 +09:30
Jon
a18d9c2789 chore: add squash link to pr template
ref: #702
2025-04-09 12:12:16 +09:30
Jon
f2b13e5a0c fix(feature_flag): cater for settings flag overrides
ref: #702
2025-04-09 11:22:05 +09:30
Jon
3763eb8727 Merge pull request #713 from nofusscomputing/tests-entities-person-contact 2025-04-08 23:36:57 +09:30
Jon
b99b38f623 test(access): Ensure Model Contacts inherits from Person Model
ref: #713 closes #703
2025-04-08 22:56:42 +09:30
Jon
7aae162453 test(access): Functional Test Suite for Contact API Metadata, API Permissions and ViewSet
ref: #713 #703
2025-04-08 22:51:00 +09:30
Jon
aad1407647 test(access): Functional Test Suite for Contact serializer
ref: #713 #703
2025-04-08 22:50:34 +09:30
Jon
79efc2258f test(access): Functional Test Suite for Contact history
ref: #713 #703
2025-04-08 22:50:24 +09:30
Jon
8b32faa736 test(access): Correct Entity and person functional Test Suite so sub-model testing works
ref: #713 #703
2025-04-08 22:49:49 +09:30
Jon
3b04b0c9a4 test(access): Correct table_fields test case to cater for dynamic field
ref: #713 #703
2025-04-08 22:49:16 +09:30
Jon
4518449232 test(access): Unit Test for Contact ViewSet
ref: #713 #703
2025-04-08 21:55:22 +09:30
Jon
6d708d0c00 test(access): Unit Test for Contact model
ref: #713 #703
2025-04-08 21:55:10 +09:30
Jon
5bf89e1ca6 test(access): Unit Test for Contact history API field checks
ref: #713 #703
2025-04-08 21:55:04 +09:30
Jon
23213c148c test(access): Unit Test for Contact API field checks
ref: #713 #703
2025-04-08 21:54:57 +09:30
Jon
dd4175a6ba test(access): Unit Test for Person Tenancy Object
ref: #713 #703
2025-04-08 21:53:41 +09:30
Jon
1d9ce9d310 test(access): Correct Entity and person unit Test Suite so sub-model testing works
ref: #713 #703
2025-04-08 21:53:21 +09:30
Jon
813470f084 fix(access): Add missing field directory to contact model
ref: #713 #703
2025-04-08 21:52:07 +09:30
Jon
bb27bcc280 feat(access): Ensure that the same person cant be created more than once
based off of combined fields f_name, l_name and dob (if dob is not empty)

ref: #713 #571
2025-04-08 21:09:57 +09:30
Jon
1b53faf9ce test(access): Entity Function Serializer test cases
ref: #713 #571
2025-04-08 21:07:57 +09:30
Jon
33d20a4c0a test(access): Person Model field test cases
ref: #713 #571
2025-04-08 19:43:01 +09:30
Jon
fe7e2b9d22 test(access): Functional Test for Person ViewSet, Permissions and Metadata
ref: #713 closes #571
2025-04-08 19:10:01 +09:30
Jon
c563c07345 test(access): Functional Test for Person History
ref: #713 #571
2025-04-08 19:07:58 +09:30
Jon
3b72df61a4 test(access): Correct Entity Function Test Suite so sub-model testing works
ref: #713 #571
2025-04-08 19:07:41 +09:30
Jon
c3da9503d2 test(access): Unit Test for Person ViewSet
ref: #713 #571
2025-04-08 17:53:59 +09:30
Jon
c42037cef6 test(access): Unit Test for Person Model
ref: #713 #571
2025-04-08 17:53:40 +09:30
Jon
192f46022c test(access): Unit Test for Person History API fields
ref: #713 #571
2025-04-08 17:53:32 +09:30
Jon
81860cac84 test(access): Unit Test for Person API fields
ref: #713 #571
2025-04-08 17:53:16 +09:30
Jon
b66feadb5a test(access): Unit Test for Person Tenancy Object
ref: #713 #571
2025-04-08 17:52:50 +09:30
Jon
b01a2a9a47 test(access): Correct Entity Test Suite so sub-model testing works
ref: #713 #571
2025-04-08 17:49:27 +09:30
Jon
f7d3cdd463 test(app): exclude any field check that ends in _ptr_id
this field is for linking tables and a django field

ref: #713
2025-04-08 17:31:18 +09:30
Jon
3bb63b2a5b Merge pull request #712 from nofusscomputing/model-roles 2025-04-08 16:16:51 +09:30
Jon
05ec53331a fix(settings): Add Application Settings to Admin page
Allows the webmaster to set application settings

ref: #712 fixes #440
2025-04-08 16:00:54 +09:30
Jon
6aebde7845 test(access): Remove teardown from Function Test cases for Role serializer
ref: #712 #683
2025-04-08 15:22:49 +09:30
Jon
4de24a7d88 docs(user): Roles Initial
ref: #712 closes #683
2025-04-07 14:21:19 +09:30
Jon
322b7a1c41 test(access): Test cases for Role serializer
ref: #712 #683
2025-04-07 14:07:08 +09:30
Jon
825683e162 test(access): Function Test cases for Role SPI Permissions, ViewSet and Metadata
ref: #712 #683
2025-04-06 15:17:19 +09:30
Jon
6bb5a47dd3 test(access): Function Test cases for Role History
ref: #712 #683
2025-04-06 15:16:27 +09:30
Jon
47381c7bf7 test(access): Unit Test case to ensure Role is by organization
ref: #712 #683
2025-04-06 14:51:03 +09:30
Jon
8b08d03d95 test(access): Unit Test case to ensure Role cant be set as global object
ref: #712 #683
2025-04-06 14:46:49 +09:30
Jon
360bf60578 test(access): Unit Test cases for Role ViewSet
ref: #712 #683
2025-04-06 14:41:29 +09:30
Jon
c8c2fcabd2 test(access): Unit Test cases for Role model
ref: #712 #683
2025-04-06 14:41:15 +09:30
Jon
1830b86309 test(access): Unit Test cases for Role History API v2
ref: #712 #683
2025-04-06 14:41:07 +09:30
Jon
9e712d3624 test(access): Unit Test cases for Role API v2
ref: #712 #683
2025-04-06 14:40:58 +09:30
Jon
a2a79be7c1 test(access): Unit Test cases for Role Tenancy Object
ref: #712 #683
2025-04-06 14:40:47 +09:30
Jon
d5a2adc3a9 feat(access): Place Roles Model behind feature flag 2025-00003
ref: #712 #683 #551
2025-04-06 14:13:19 +09:30
Jon
779335458e docs(github): model issue template updated to remove model_tag requirement that is not required
ref: #712
2025-04-06 14:01:15 +09:30
Jon
8bc0b3338c refactor(core): When saving history, ensure field _prefetched_objects_cache is not included
ref: #712 #683
2025-04-06 13:51:08 +09:30
Jon
9d8bcff2a0 feat(access): When querying permissions, select related field content_type
speeds up query and reduces required sql queries

ref: #712 #683
2025-04-06 13:50:24 +09:30
Jon
8a8023f510 feat(core): Model tag for Access/Role
ref: #712 #683
2025-04-06 13:49:20 +09:30
Jon
7289758ed9 feat(access): Model Role notes endpoint
ref: #712 #683
2025-04-06 13:46:21 +09:30
Jon
d7405a500d feat(access): Add navigation entry for roles
ref: #712 #683
2025-04-06 13:45:52 +09:30
Jon
d63c249120 feat(access): Model Role History migrations
ref: #712 #683
2025-04-06 13:45:18 +09:30
Jon
e920a66a47 feat(access): Add model Role History
ref: #712 #683
2025-04-06 13:45:07 +09:30
Jon
cb4a12f2a0 feat(access): Role Notes model viewset
ref: #712 #683
2025-04-06 13:44:26 +09:30
Jon
d8263b36f7 feat(access): Role Notes model serializer
ref: #712 #683
2025-04-06 13:44:11 +09:30
Jon
74482956a4 feat(access): Model Role Notes migrations
ref: #712 #683
2025-04-06 13:43:58 +09:30
Jon
1bc199493c feat(access): Add model Role Notes
ref: #712 #683
2025-04-06 13:43:47 +09:30
Jon
5cccca865e feat(access): Role model viewset
ref: #712 #683
2025-04-06 13:43:20 +09:30
Jon
03d258ca57 feat(access): Role model serializer
ref: #712 #683
2025-04-06 13:40:16 +09:30
Jon
dfea1fdba0 feat(access): Model Role migrations
ref: #712 #683
2025-04-06 13:39:37 +09:30
Jon
edff3eb889 feat(access): Add model Role
ref: #712 #683
2025-04-06 13:38:38 +09:30
Jon
bdd55a4df6 Merge pull request #707 from nofusscomputing/new-model-entity 2025-04-04 15:53:04 +09:30
Jon
ca0bb96808 test: During testing add debug_feature_flags so object behind can be tested
ref: #707
2025-04-04 14:56:22 +09:30
Jon
5b0d9d8d81 feat(python): Upgrade Django 5.1.7 -> 5.2
ref: #707
2025-04-04 13:39:45 +09:30
Jon
dd264920a6 feat(access): Place Entity URLs behind feature flag 2025-00002
ref: #707 #704 closes #706
2025-04-04 13:30:49 +09:30
Jon
050b2d7602 test(access): Notes ViewSet Functional Tests for Entity Model
ref: #707 #706
2025-04-04 13:06:27 +09:30
Jon
ea7c359cc8 test(access): Notes API Field Functional Tests for Entity Model
ref: #707 #706
2025-04-04 12:47:04 +09:30
Jon
b3391c7e3e test(access): Correct functional ViewSet test suite for Entity model
ref: #707 #706
2025-04-04 12:11:08 +09:30
Jon
22e369aa3e test(access): History functional Tests for Entity model
ref: #707 #706
2025-04-04 12:02:55 +09:30
Jon
d0f710d9f8 test(access): PermissionsAPI, ViewSet and Metadata Tests for Entity model
ref: #707 #706
2025-04-04 11:39:06 +09:30
Jon
bd58d1d9cf feat(access): Add detail page layout for contact model
ref: #707 #705
2025-04-04 11:27:53 +09:30
Jon
184820780a feat(access): Add Menu entry for corporate directory
ref: #707 #705
2025-04-04 11:27:24 +09:30
Jon
6941668709 feat(access): Add back_url to Entity metadata
ref: #707 #705
2025-04-04 11:26:55 +09:30
Jon
f2cdd403e3 fix(access): Remove app_namespace from Entity
ref: #707 #706
2025-04-04 11:26:10 +09:30
Jon
cb43c56efb docs(user): Add initial contacts
ref: #707 #705
2025-04-04 11:25:33 +09:30
Jon
9bbfbbba4b feat(core): Add Entity model tag
ref: #707 #706
2025-04-04 07:46:08 +09:30
Jon
296188b202 feat(access): Update Entity field entity_type if it does not match the entity type
ref: #707 #706
2025-04-03 19:56:17 +09:30
Jon
de26f4b4e9 docs(development): Entity
ref: #707 #706
2025-04-03 19:29:41 +09:30
Jon
600a12177f feat(access): All Entity models to use the entity history endpoint
ref: #707 #706
2025-04-03 18:33:14 +09:30
Jon
167f4140ba feat(access): Enable specifying the history model to use for audit history for a model
ref: #707
2025-04-03 18:32:50 +09:30
Jon
2d6c347859 fix(access): add missing tenancy object fields to non-tenancy object models
ref: #707
2025-04-03 18:31:51 +09:30
Jon
2998f48e33 fix(core): Dont attempt to fetch history related objects if no history exists
ref: #707
2025-04-03 18:25:08 +09:30
Jon
03a9582703 feat(access): Enable specifying the kb model to use for linking kb article to a model
ref: #707
2025-04-03 18:11:03 +09:30
Jon
3417e37317 feat(access): All Entity models to use the entity notes endpoint
ref: #707 #706
2025-04-03 18:09:48 +09:30
Jon
aba9f44552 feat(access): Enable specifying the notes basename for a model
ref: #707
2025-04-03 17:44:18 +09:30
Jon
569a256dd5 feat(access): ViewSet for Entity Notes model
ref: #707 #706
2025-04-03 17:23:28 +09:30
Jon
22785a095d feat(access): Serializer for Entity Notes model
ref: #707 #706
2025-04-03 17:22:45 +09:30
Jon
209e67e0b1 feat(access): new model Entity Notes
ref: #707 #706
2025-04-03 17:22:28 +09:30
Jon
b50b0bbd8b test(access): Model test cases for Entity
ref: #707 #706
2025-04-03 17:00:00 +09:30
Jon
bbbf7cb38a test(access): API Rendering test cases for Entity model
ref: #707 #706
2025-04-03 17:00:00 +09:30
Jon
3624885f1e test(api): Ensure that when mocking the request the viewset is instantiated
ref: #707
2025-04-03 17:00:00 +09:30
Jon
1f817109ae test(access): History tests for Entity model
ref: #707 #706
2025-04-03 17:00:00 +09:30
Jon
711c546e69 test(access): ViewSet tests for Entity model
ref: #707 #706
2025-04-03 17:00:00 +09:30
Jon
11e32435a2 test(access): Tenancy object test for Entity model
ref: #707 #706
2025-04-03 17:00:00 +09:30
Jon
8c0b9bf182 feat(access): New model Entity History
ref: #707 #706
2025-04-03 17:00:00 +09:30
Jon
44ec81c3ae feat(access): Add Entity URL routes
ref: #707 #706
2025-04-03 17:00:00 +09:30
Jon
24132a0b1c fix(api): Dont attempt to access kwargs if not exists within common serializer
ref: #707
2025-04-03 17:00:00 +09:30
Jon
b887bb6169 feat(access): new serializer Contact
ref: #707 #703
2025-04-03 16:59:59 +09:30
Jon
93ce31d2cf feat(access): new model Contact
ref: #707 #703
2025-04-03 16:59:59 +09:30
Jon
7f4ff50ceb feat(access): new serializer Person
ref: #707 #571
2025-04-03 16:59:59 +09:30
Jon
534dab2ca6 feat(access): new model Person
ref: #707 #571
2025-04-03 16:59:59 +09:30
Jon
705a775ddd feat(access): new ViewSet for for Entity and sub-entities
ref: #707 #706
2025-04-03 16:59:59 +09:30
Jon
7e79385558 feat(access): new serializer Entity
ref: #707 #706
2025-04-03 16:59:59 +09:30
Jon
798cfbe975 feat(access): new model Entity
ref: #707 #706
2025-04-03 16:59:59 +09:30
Jon
bfefbae686 docs: update roadmap
ref: #707
2025-04-03 13:07:16 +09:30
Jon
8363cd379f chore: update issue template for new model
ref: #702
2025-03-29 15:46:55 +09:30
Jon
9496ae6aaf feat(human_resources): Add navigation menu entry for Human Resources (HR)
ref: #702 #569
2025-03-29 15:24:56 +09:30
Jon
5208340370 feat(human_resources): Add module Human Resources (HR) to API Urls
ref: #702 #569
2025-03-29 15:18:37 +09:30
Jon
9b58e5913f feat(base): Add module Human Resources (HR) to installed apps
ref: #702 #569
2025-03-29 15:18:13 +09:30
Jon
748dbea515 feat: Add module Human Resources (HR)
ref: #702 closes #569
2025-03-29 15:10:58 +09:30
b7880de54d build: bump version 1.13.1 -> 1.14.0 2025-03-29 05:22:02 +00:00
Jon
69b727a06c Merge pull request #690 from nofusscomputing/feature-next-release 2025-03-29 14:29:23 +09:30
Jon
26cdd7495a docs(administration): Add reverse proxy paths for containers
ref: #690 closes #674
2025-03-29 13:57:35 +09:30
Jon
e2182fe37e Merge pull request #696 from nofusscomputing/test-viewset 2025-03-29 13:40:57 +09:30
Jon
e8b30796ab docs(development): update testing docs to reflect change in writing tests
ref: #696 #672
2025-03-29 13:14:38 +09:30
Jon
36f314fc6f test(api): Correct test cases for view_name and view_description
cheking type is N/A due to those attributes being set via a getter

ref: #696 #672
2025-03-29 12:35:45 +09:30
Jon
1d1c76e033 test: Refactor all ViewSet Unit Test cases to use new test cases class
ref: #696 closes #672
2025-03-25 02:22:47 +09:30
Jon
e8bc98c315 test(api): Common ViewSet classes Tests and Test cases for classes that inherit them
migrated old viewset test cases to this test file so all common viewset classes
are tested in the one location.

ref: #696 #672
2025-03-25 02:22:26 +09:30
Jon
853906e9ee Merge pull request #694 from nofusscomputing/new-module-itops 2025-03-23 11:06:46 +09:30
Jon
403b6be252 feat(itops): Add navigation menu
ref: #693 closes #567
2025-03-23 10:41:26 +09:30
Jon
ac78032cca feat: New Module ITOps
ref: #694 #567
2025-03-23 10:40:21 +09:30
Jon
08fd187692 Merge pull request #693 from nofusscomputing/model-git-repository 2025-03-23 08:09:03 +09:30
Jon
8bd90df582 feat(devops): Ensure GitHub Groups can't be nested
ref: #693 #515 closes #249
2025-03-23 07:55:47 +09:30
Jon
85a2779563 feat(devops): Models Git Repository must use organization from git_group as must group if parent set
ref: #693 #515
2025-03-23 07:47:05 +09:30
Jon
9cc5db7869 refactor(devops): remove model unique_together constraint for git group and repository
this field is used for sync only

ref: #693 #515
2025-03-23 07:19:49 +09:30
Jon
e65b2531ed refactor(devops): Field provider_id must not be user editable for git group or repository
this field is used for sync only

ref: #693 #515
2025-03-23 07:19:19 +09:30
Jon
3a9198f63c fix(devops): Correct git_group serializer parameter name
ref: #693 #515
2025-03-22 21:25:51 +09:30
Jon
4d8fc508d4 fix(devops): Correct field path to no be unique for git_repository
ref: #693 #515
2025-03-22 21:25:28 +09:30
Jon
67b0187a58 test(api): correct nav menu setup to use mock request
ref: #693
2025-03-22 21:24:40 +09:30
Jon
12ef8918ba fix(feature_flag): if over_rides not set ensure val set to empty dict
ref: #693
2025-03-22 20:53:17 +09:30
Jon
5f3990e15a feat(devops): Add git provider badge to git_group table fields
ref: #693
2025-03-22 20:45:13 +09:30
Jon
491e0dba64 feat(devops): Add git provider badge to git_repository table fields
ref: #693
2025-03-22 20:45:02 +09:30
Jon
50cb54ab0c feat(devops): Add Git GRoup to navigation
ref: #693
2025-03-22 19:25:13 +09:30
Jon
7638fa39da feat(itam): Add back_url to Software Version ViewSet
ref: #693
2025-03-22 19:24:51 +09:30
Jon
b0df5713b2 feat(itam): Add back_url to Operating System ViewSet
ref: #693
2025-03-22 19:24:27 +09:30
Jon
57c5947c55 feat(devops): Add page_layout to Git Group model
ref: #693 #515
2025-03-22 19:23:49 +09:30
Jon
bfd54c112b feat(devops): Add page_layout to GitLab repository model
ref: #693 #515
2025-03-22 19:23:31 +09:30
Jon
e2ca5b8587 feat(devops): Add page_layout to GitHub repository model
ref: #693 #515
2025-03-22 19:23:20 +09:30
Jon
f406e7bf3b feat(devops): git_repository ViewSet updated to fetch queryset based off of repository provider
ref: #693 #515
2025-03-22 19:22:49 +09:30
Jon
1e127d7180 feat(devops): Add ti git_repository ViewSet return and back urls
ref: #693 #515
2025-03-22 19:21:58 +09:30
Jon
a0dd0384bf fix(devops): git_group serializers must define fields
ref: #693 #515
2025-03-22 19:21:04 +09:30
Jon
60cc64ba19 fix(devops): git_group serializers must return urls
ref: #693 #515
2025-03-22 19:20:42 +09:30
Jon
2e9470be83 fix(devops): Correct git_repository notes urls
ref: #693 #515
2025-03-22 19:19:53 +09:30
Jon
ade836911f fix(devops): Correct git_repository url regex
ref: #693 #515
2025-03-22 19:19:40 +09:30
Jon
84f2e8d8c3 feat(devops): Make fields provider and provider_id unique_together for git_repository model
ref: #693 #515
2025-03-22 19:17:33 +09:30
Jon
64b677eaa9 fix(devops): Correct ViewSerializer for GitLab Repository
ref: #693 #515
2025-03-22 19:15:58 +09:30
Jon
4bd5a890db fix(devops): Correct ViewSerializer for GitHib Repository
ref: #693 #515
2025-03-22 19:15:44 +09:30
Jon
48a7a206d2 feat(devops): Add fields to ALL git_repository serializers
ref: #693 #515
2025-03-22 18:55:03 +09:30
Jon
b837338140 fix(devops): Correct model git_group modified field name part 2
ref: #693 #515
2025-03-22 18:53:56 +09:30
Jon
0ad80a6f9a feat(devops): Add fetching of URL to base git_repository model
ref: #693 #515
2025-03-22 18:53:33 +09:30
Jon
a30cad25bc fix(devops): Correct model git_group modified field name
ref: #693 #515
2025-03-22 18:52:35 +09:30
Jon
668a64bb79 fix(api): Fetching of serializer_class must be dynamic
ref: #693
2025-03-22 18:52:00 +09:30
Jon
9d67624e9d feat(api): Enable fetching of app_namespace from model
ref: #693
2025-03-22 18:51:05 +09:30
Jon
ca2e4e00fa feat(access): Add function get_page_layout
enables dynamic page_layout

ref: #693
2025-03-22 18:50:28 +09:30
Jon
57cd4851a8 chore(feature_flag): [2025-00001] add feature flag as enabled when DEBUG=True
so that development can occur

ref: #693 #515
2025-03-22 14:41:53 +09:30
Jon
e6f576ef1a feat(feature_flag): Provide user with ability to override feature flags
ref: #693 #493 #575
2025-03-22 14:40:41 +09:30
Jon
b34c76afde feat(base): Add middleware feature_flag
ref: #693 #515
2025-03-22 13:51:22 +09:30
Jon
f0171fcfda refactor(api): mv _nav property to function get_nav_items
required for dynamic nav menu creation

ref: #693 #515
2025-03-22 13:50:28 +09:30
Jon
04b5b4dc24 feat(devops): Disable notes for GIT Repository Base Model
ref: #693 #515
2025-03-20 16:48:36 +09:30
Jon
77e42db3c9 feat(devops): Add git_repository model tag migration
ref: #693 #515
2025-03-20 16:48:09 +09:30
Jon
25e0f6d950 feat(devops): Add git_repository as a model that can be linked to a ticket
ref: #693 #515
2025-03-20 16:47:39 +09:30
Jon
e725efb9b7 chore: Add missing devops imports
ref: #693 #515
2025-03-20 15:58:26 +09:30
Jon
f6bf6df31c docs(user): Add Git repository and groups
ref: #693 #515
2025-03-20 15:48:54 +09:30
Jon
2994cfd783 feat(devops): Git Group Notes Migration
ref: #693 #515
2025-03-20 15:23:13 +09:30
Jon
d006da803f feat(devops): Git Group Notes ViewSet
ref: #693 #515
2025-03-20 15:23:02 +09:30
Jon
b1f80cb1b2 feat(devops): Git Group Notes Serializer
ref: #693 #515
2025-03-20 15:22:17 +09:30
Jon
9485d4fce7 feat(devops): Git Group Notes Model
ref: #693 #515
2025-03-20 15:22:10 +09:30
Jon
f5e8dd95db feat(devops): GitHub and GitLab Repository Notes Migrations
ref: #693 #515
2025-03-20 15:15:34 +09:30
Jon
83d937ce7a feat(devops): GitLab Repository Notes Viewset
ref: #693 #515
2025-03-20 15:14:31 +09:30
Jon
ee4ff23618 feat(devops): GitHub Repository Notes Viewset
ref: #693 #515
2025-03-20 15:14:15 +09:30
Jon
2b19f466f2 feat(devops): GitLab Repository Notes Serializer
ref: #693 #515
2025-03-20 15:12:06 +09:30
Jon
8caa8646b4 feat(devops): GitHub Repository Notes Serializer
ref: #693 #515
2025-03-20 15:11:58 +09:30
Jon
dc9d1d283f feat(devops): GitLab Repository Notes Model
ref: #693 #515
2025-03-20 15:11:44 +09:30
Jon
0c82fd2bb1 feat(devops): GitHub Repository Notes Model
ref: #693 #515
2025-03-20 15:11:34 +09:30
Jon
5483c1878d feat(devops): Git Group History Migrations
ref: #693 #515
2025-03-20 14:54:10 +09:30
Jon
bd22604d9d feat(devops): Git Group History
ref: #693 #515
2025-03-20 14:54:02 +09:30
Jon
e8c246a949 feat(devops): GitLab and GitHub Repository History Migrations
ref: #693 #515
2025-03-20 14:51:25 +09:30
Jon
69c631d59b feat(devops): GitLab Repository History
ref: #693 #515
2025-03-20 14:51:04 +09:30
Jon
561e175723 feat(devops): GitHub Repository History
ref: #693 #515
2025-03-20 14:50:48 +09:30
Jon
4c6c27a4bd feat(devops): [2025-00001] Git Group and Repositories URLs
behind FF 2025-00001

ref: #693 #515
2025-03-20 14:31:24 +09:30
Jon
cb95cb506a feat(devops): Git Group and Repositories Migrations
ref: #693 #515
2025-03-20 14:24:49 +09:30
Jon
2b3070c5c2 feat(devops): GIT Group ViewSet
ref: #693 #515
2025-03-20 14:14:07 +09:30
Jon
9229036b72 feat(devops): GIT Group Serializer
ref: #693 #515
2025-03-20 14:13:10 +09:30
Jon
b5b8030c81 feat(devops): GIT Group Model
ref: #693 #515
2025-03-20 14:12:58 +09:30
Jon
8d4aad7745 feat(devops): GIT Repositories Viewset
ref: #693 #515
2025-03-20 14:12:29 +09:30
Jon
c5e33c4e3d feat(devops): GitLab Serializer for git repositories
ref: #693 #515
2025-03-20 14:09:12 +09:30
Jon
23773a8776 feat(devops): GitHub Serializer for git repositories
ref: #693 #515
2025-03-20 14:09:00 +09:30
Jon
ef0b024a12 feat(devops): Base Serializer for git repositories
ref: #693 #515
2025-03-20 14:08:16 +09:30
Jon
3cdf0c7324 feat(devops): GitLab Repository Model
ref: #693 #515
2025-03-20 14:07:38 +09:30
Jon
051995efca feat(devops): GitHub Repository Model
ref: #693 #515
2025-03-20 14:07:32 +09:30
Jon
717bd1e221 feat(devops): Base model for git repositories
ref: #693 #515
2025-03-20 14:07:02 +09:30
Jon
e158be3cb2 chore: update issue template new model
ref: #693
2025-03-20 13:39:59 +09:30
Jon
7a7281ecfc Merge pull request #691 from nofusscomputing/test-ticket-slash-commands 2025-03-19 15:50:44 +09:30
Jon
88d1abaef7 fix(core): Don't create an empty ticket comment if the body is empty when slash commands removed
ref: #691 #681
2025-03-19 15:36:13 +09:30
Jon
5804abc367 docs(core): Update slash command docs
ref: #691 #681
2025-03-19 14:51:37 +09:30
Jon
96f8949be2 feat(core): Enable slash command related ticket to have multiple ticket references
ref: #691 #681
2025-03-19 14:38:30 +09:30
Jon
cce802ea9e test(core): un-mark tests as skipped so that multiple linked items per ticket can be tested
ref: #691 closes #681
2025-03-19 13:55:57 +09:30
Jon
c767a528eb fix(core): when processing slash commands trim each line prior to processing
ref: #691 #681
2025-03-19 13:28:11 +09:30
Jon
895cfb8b22 test(core): correct ticket linked item to prevent duplicate creation
ref: #691 #681
2025-03-19 13:27:48 +09:30
Jon
8dfaec8df7 fix(core): slash command NL char is \r\n not \n, however support both
ref: #691 #681
2025-03-19 12:50:56 +09:30
Jon
69cabda78e fix(core): When processing slash commands trim whitespace on return
ref: #691 #681
2025-03-19 12:50:34 +09:30
Jon
8abced87de fix(core): Ensure linked ticket models are unique
ref: #691 #681
2025-03-19 12:00:05 +09:30
Jon
983311dda5 feat(core): Enable slash command linked model to have multiple models
ref: #691 #681
2025-03-19 12:00:05 +09:30
Jon
2becbeef87 feat(core): process ticket slash commands by line
ref: #691 #681
2025-03-19 12:00:05 +09:30
Jon
9583631473 feat(core): Migrations for new slash commands
ref: #690 #592 #598 #600
2025-03-17 15:59:04 +09:30
Jon
44e1461c6b feat(project_management): Add project_state slash command
ref: #690 closes #592
2025-03-17 15:52:18 +09:30
Jon
105e6509b0 feat(core): Add ticket_comment_category slash command
ref: #690 closes #600
2025-03-17 15:51:30 +09:30
Jon
20d979963a feat(core): Add ticket_category slash command
ref: #690 closes #598
2025-03-17 15:38:55 +09:30
Jon
928dee74b5 feat(itam): when displaying software version, add prefix with software name
ref: #690 #596
2025-03-17 15:26:01 +09:30
Jon
bde2b2e758 feat(itam): Add markdown tag $software_version
ref: #690 closes #596
2025-03-17 15:22:53 +09:30
Jon
54b97b43ed feat(itam): Enable ticket tab on software version page
ref: #690 #596
2025-03-17 15:22:07 +09:30
Jon
405538fa35 fix(itam): Add back url to software_version model
ref: #690
2025-03-17 15:19:59 +09:30
7a9680d988 build: bump version 1.13.0 -> 1.13.1 2025-03-17 04:16:28 +00:00
Jon
d7d85bd01d Merge pull request #688 from nofusscomputing/fix-feature-flag-crash 2025-03-17 13:34:04 +09:30
Jon
becb1eef26 fix(devops): After fetching feature flags dont attempt to access results unless status=200
ref: #688 #687
2025-03-17 13:12:29 +09:30
Jon
bf973d3765 fix(docker): only download feature flags when not a worker
ref: #688 fixes #687
2025-03-17 12:23:35 +09:30
Jon
7912a67ab7 refactor(docker): Use crontabs not cron.d
ref: #688 fixes #687
2025-03-17 12:17:59 +09:30
Jon
6272eef45f fix(devops): Use correct stderr function when using feature_flag management command
ref: #688 #687
2025-03-17 11:44:05 +09:30
Jon
176537d583 fix(devops): Cater for connection timeout when fetching feature flags
ref: #688 #687
2025-03-17 11:43:37 +09:30
Jon
2491ab611b fix: when building feature flag version, use first 8 chars of build hash
ref: #688 #687
2025-03-17 11:42:01 +09:30
3925b96cb0 build: bump version 1.12.0 -> 1.13.0 2025-03-16 02:34:25 +00:00
Jon
8488642651 Merge pull request #660 from nofusscomputing/feature-next-release 2025-03-16 11:51:16 +09:30
Jon
cb96d33f74 Merge pull request #679 from nofusscomputing/devops-feature-flagging 2025-03-16 11:35:01 +09:30
Jon
70978b9fdc chore: squash migrations prior to release
ref: #679 #660
2025-03-16 11:18:02 +09:30
Jon
0452293546 docs(development): Notate usage of dict for table field
ref: #679 nofusscomputing/centurion_erp_ui#95 closes #669
2025-03-16 11:09:15 +09:30
Jon
9c65d7f355 test(devops): Feature Flag History API render checks
ref: #679 #659
2025-03-16 09:14:50 +09:30
Jon
32137334ad test(devops): Feature Flag Serializer checks
ref: #679 #659
2025-03-16 09:14:37 +09:30
Jon
a9fb70fcc7 feat(devops): Add ability for user to turn off feature flagging check-in
ref: #679 #496
2025-03-16 08:39:37 +09:30
Jon
c34903abf2 test(devops): CheckIn Entry created of fetching feature flags
ref: #679 #676 #496
2025-03-16 08:25:51 +09:30
Jon
70c7100b1d test(devops): CheckIn model test cases
ref: #679 closes #677
2025-03-16 06:41:43 +09:30
Jon
8eb1650273 chore: update ticket template new model unit test (tenancy)
ref: #679
2025-03-16 06:39:01 +09:30
Jon
68364906f9 chore(devops): Squash All migrations
as this has not been released to production, squash to single migration

ref: #660 #68 #496
2025-03-15 05:03:36 +09:30
Jon
f99c1e2132 Merge pull request #678 from nofusscomputing/devops-check-in 2025-03-15 04:55:13 +09:30
Jon
179340e1a2 feat(devops): When displaying the feature_flag deployments, limit to last 24-hours
ref: #678 #676 #496
2025-03-15 04:35:45 +09:30
Jon
b4d41970aa feat(devops): During feature flag Checkin derive the version from the last field of the user-agent
ref: #678 #676
2025-03-15 04:10:40 +09:30
Jon
5f62828f28 feat(devops): Add missing column to model Checkin
ref: #678 #677
2025-03-15 04:08:58 +09:30
Jon
46996b7f14 feat(devops): Remove model Checkin permissions from permissions selector
ref: #678 #677
2025-03-15 03:42:53 +09:30
Jon
2929e347c7 docs(user): Add how to enable feature flagging
ref: #678 #676
2025-03-15 03:35:01 +09:30
Jon
b8281a3dd7 fix(devops): Only track checkin if no other error occured
ref: #678 #676
2025-03-15 03:33:47 +09:30
Jon
3888ab737b fix(devops): during feature flag checkin, if no client-id provided, use value not-provided
ref: #678 #676
2025-03-15 02:29:37 +09:30
Jon
acc31ef079 feat(devops): Display the days total unique check-ins for feature flags within software feature flagging tab
ref: #678 #676
2025-03-15 02:24:47 +09:30
Jon
19ce303045 feat(devops): Record to check-in table every time feature flags are obtained
ref: #678 #676
2025-03-15 02:21:56 +09:30
Jon
0dbde5e1d6 feat(devops): Migrations for model CheckIns
ref: #678 #677
2025-03-15 02:18:24 +09:30
Jon
f3a45d6ec2 feat(devops): New model CheckIns
ref: #678 #677
2025-03-15 02:16:54 +09:30
Jon
f24f02df5d Merge pull request #675 from nofusscomputing/temp-add-feature-flag 2025-03-14 23:57:16 +09:30
Jon
3ab5babd31 feat: Generate a deployment unique ID
ref: #675 #575
2025-03-14 23:34:35 +09:30
Jon
14c193d72a feat(devops): Provide user with option to disable downloading feature flags
ref: #675 #575
2025-03-14 23:04:57 +09:30
Jon
b22f4e2ea9 feat(devops): Feature Flagging url.path wrapper
ref: #675 #575
2025-03-14 22:38:43 +09:30
Jon
29553474f2 fix(devops): When init the feature flag clients, look for all args within settings
ref: #675 #575
2025-03-13 20:49:18 +09:30
Jon
19d6b4f7e8 fix(devops): Only add Last-Modified header to response if exists
ref: #675 #575
2025-03-13 19:53:59 +09:30
Jon
f1fb3cd7ff feat(docker): Configure cron to download feature flags every four hours
ref: #675 #575
2025-03-13 19:53:00 +09:30
Jon
f1570a1997 feat(docker): Start and run crond within container
ref: #675 #575
2025-03-13 19:52:24 +09:30
Jon
2f95482150 feat(docker): Download feature flags on container start
ref: #675 #575
2025-03-13 19:52:04 +09:30
Jon
b2e82fd8c9 feat(devops): Feature Flagging DRF Router wrapper
ref: #675 #575
2025-03-13 19:49:31 +09:30
Jon
192efadb08 feat(devops): Feature Flagging middleware
ref: #675 #575
2025-03-13 19:49:11 +09:30
Jon
00d16f841f feat(devops): Feature Flagging management command
ref: #675 #575
2025-03-13 19:49:02 +09:30
Jon
c5107861a1 feat(devops): Add Feature Flagging lib
ref: #675 #575
2025-03-13 19:47:44 +09:30
Jon
1d9580f14b feat(devops): add temp application for feature flag client
ref: #675 #575
2025-03-13 19:40:42 +09:30
Jon
aa77c69ed7 Merge pull request #673 from nofusscomputing/public-endpoint-feature-flagging 2025-03-10 20:25:45 +09:30
Jon
acf9f20ab9 test(devops): public feature flag fields corrections
ref: #673 #663
2025-03-10 20:07:12 +09:30
Jon
6cf6a23964 feat(devops): public feature flag endpoint pagination limited to 20 results
ref: #673 closes #663
2025-03-10 19:37:37 +09:30
Jon
a69e102432 test(devops): public feature flag functional ViewSet checks
ref: #673 #663
2025-03-10 19:36:52 +09:30
Jon
89e2de437f fix(devops): Correct logic for data changed check for public endpoint for feature flagging
ref: #673 #663
2025-03-10 19:19:58 +09:30
Jon
dcebd4b8d6 fix(devops): feature flag public ViewSet serializer name correction and qs cache correction
ref: #673 #663
2025-03-10 18:28:18 +09:30
Jon
2e35b651ef test(devops): feature flag ViewSet checks
ref: #673 #663
2025-03-10 16:04:43 +09:30
Jon
2f06814d99 test(api): Update vieset test cases to cater for mockrequest to contain headers attribute
ref: #673
2025-03-10 16:04:09 +09:30
Jon
faff43510d test(devops): feature flag public endpoint API field, header checks
ref: #673 #663
2025-03-10 15:21:07 +09:30
Jon
42105d4621 fix(devops): feature flag public endpoint field modified name typo
ref: #673 #663
2025-03-10 15:19:57 +09:30
Jon
f61799dbfe docs(devops): feature flag if-modified-since header
ref: #673 #663
2025-03-08 21:19:49 +09:30
Jon
427584c8d9 feat(devops): Add support for if-modified-since header for Feature Flags public endpoint
ref: #673 #663
2025-03-08 21:05:44 +09:30
Jon
a07ee8472e fix(devops): Filter public feature flag endpoint to org and software where software is enabled
ref: #673 #663
2025-03-08 19:36:12 +09:30
Jon
3eb02602d6 fix(devops): Move software field filter for feature flag to the serializer
ref: #673 #663
2025-03-08 19:30:45 +09:30
Jon
7dac29971f feat(api): Add public API feature flag index endpoint
ref: #673 #663
2025-03-08 17:49:07 +09:30
Jon
0c6fb786dd feat(api): Add public API endpoint
ref: #673 #663
2025-03-08 17:45:20 +09:30
Jon
d09e649765 feat(devops): Add feature flag public ViewSet
ref: #673 #663
2025-03-08 16:43:34 +09:30
Jon
8741e0b636 feat(devops): Add feature flag public serializer
ref: #673 #663
2025-03-08 16:42:09 +09:30
Jon
529512be3e feat(api): Add common viewset for public RO list
ref: #663
2025-03-08 16:35:00 +09:30
Jon
d038165146 Merge pull request #671 from nofusscomputing/remove-viewset-serializer-caching 2025-03-07 18:05:38 +09:30
Jon
b63f6b7092 feat: Remove serializer caching from ALL viewsets
ref: #671 closes #668
2025-03-07 17:53:14 +09:30
Jon
7b6fe804a9 feat(devops): Add delete col to software enabled feature flags
ref: #659
2025-03-07 17:38:05 +09:30
Jon
b874fc7298 Merge pull request #670 from nofusscomputing/software-feature-flagging 2025-03-07 17:22:32 +09:30
Jon
4f6debac88 fix(devops): Dont attempt to validate feature flag software or organization if it is absent
ref: #670 #659
2025-03-07 17:07:28 +09:30
Jon
5fdc0b32a6 feat(devops): Prevent deletion of software when it has feature flagging enabled and/or feature flags
ref: #670 closes #659
2025-03-07 16:35:04 +09:30
Jon
e607999a62 test(devops): Ensure that only enabled org and enabled software is possible
ref: #670 #659
2025-03-07 16:24:26 +09:30
Jon
5dd4bddea9 fix(devops): Correct feature flagging validation for enabled software and enabled orgs
ref: #670 #659
2025-03-07 16:23:48 +09:30
Jon
b60aa3be7a feat(devops): limit feature_flag to organizations that's had feature flags enabled
ref: #670 #659
2025-03-07 15:45:49 +09:30
Jon
53956e0772 feat(devops): limit feature_flag to software that's had feature flags enabled
ref: #670 #659
2025-03-07 15:45:25 +09:30
Jon
f4ccd3d164 fix(devops): dont cache serializer for featureflag
ref: #670
2025-03-07 15:44:06 +09:30
Jon
629f5aec8e feat(python): Update Django 5.1.5 -> 5.1.7
ref: #670 https://github.com/nofusscomputing/centurion_erp/security/dependabot/10
2025-03-07 13:28:50 +09:30
Jon
69eb7eb294 test(devops): software_feature_flag_enable ViewSet checks
ref: #670 closes #664
2025-03-07 13:25:15 +09:30
Jon
e317a96e45 test(devops): software_feature_flag_enable Serializer checks
ref: #670 #664
2025-03-07 13:24:36 +09:30
Jon
9720ae527a test(devops): Update feature flag test case setup to enable feature flag for testing software
ref: #662 #659
2025-03-05 04:11:20 +09:30
Jon
33644a25d1 test(devops): Update feature flag test case setup to enable feature flag for testing software
ref: #662 #659
2025-03-05 03:32:43 +09:30
Jon
eb7ff47873 fix(devops): Correct Feature Flag serializer validation to cater for edit
ref: #662 #659
2025-03-05 03:32:11 +09:30
Jon
b542e92bbd fix(devops): Feature Flag field is mandatory
ref: #670 #659
2025-03-05 03:31:10 +09:30
Jon
b515b26203 test(api): Remove serializer cache test cases
caching the serializer prevents drf form editor

ref: #670 #664
2025-03-05 02:43:56 +09:30
Jon
b562e09622 test(devops): software_feature_flag_enable api field checks
ref: #670 #664
2025-03-05 02:43:12 +09:30
Jon
748a1c80ef fix(api): make history url dynamic. only display if history should save
ref: #670
2025-03-05 02:42:51 +09:30
Jon
492bbfb521 test(devops): software_feature_flag_enable viewset checks
ref: #670 #664
2025-03-05 02:29:40 +09:30
Jon
86d5ce2062 test(devops): software_feature_flag_enable model checks
ref: #670 #664
2025-03-05 02:29:28 +09:30
Jon
541b7734e5 test(devops): software_feature_flag_enable tenancy object checks
ref: #670 #664
2025-03-05 02:29:12 +09:30
Jon
9fcea0528a feat(devops): Serializer limiting of software and os disabled for time being
ref: #670 #659
2025-03-05 02:28:05 +09:30
Jon
0a5778258b feat(devops): Serializer validate software and org
ref: #670 #659
2025-03-05 01:34:29 +09:30
Jon
75412df8b6 feat(devops): Serializer software filter to enabled feature_flag software
ref: #670 #659
2025-03-05 01:34:11 +09:30
Jon
28e80bff50 feat(devops): Serializer org filter to enabled feature_flag organizations
ref: #670 #659
2025-03-05 01:33:47 +09:30
Jon
f0ec8e4e56 feat(devops): Add endpoint for enabling software for feature flagging
ref: #670 #664
2025-03-05 01:32:49 +09:30
Jon
8124d58014 feat(devops): Add serializer for enabling software for feature flagging
ref: #670 #664
2025-03-05 01:32:23 +09:30
Jon
9f1a73d7a5 feat(devops): Add model for enabling software for feature flagging
ref: #670 #664
2025-03-05 01:32:05 +09:30
Jon
b411d1fb24 fix(devops): if software is deleted delete feature flags
ref: #659 #670
2025-03-05 01:29:43 +09:30
Jon
41727d0a16 Merge pull request #662 from nofusscomputing/feature-flagging 2025-03-04 06:11:12 +09:30
Jon
2eafb88367 fix(core): disable of notes for models not requiring it
ref: #662 #665
2025-03-04 05:58:26 +09:30
Jon
6858c04bfd fix(api): when generating notes url, use correct object
ref: #662 #659
2025-03-04 04:19:27 +09:30
Jon
124c96512a feat(devops): Add model tag feature_flag to ticket linked item
ref: #662 #659
2025-03-04 03:56:57 +09:30
Jon
23793e2133 fix(api): Add missing import for featurenotused
ref: #662
2025-03-04 03:39:53 +09:30
Jon
4b06d6a2a1 feat(devops): Add KB tab to feature flag model
ref: #662 #659
2025-03-04 03:34:51 +09:30
Jon
8a56fdfcdb feat(devops): Add Notes to feature flag model
ref: #662 #659
2025-03-04 03:34:30 +09:30
Jon
c4b640fb53 test(devops): correct dir name for tests
ref: #662 #659
2025-03-04 03:33:27 +09:30
Jon
1afa102679 test(devops): Notes feature flag model checks
ref: #662 #659
2025-03-04 03:33:09 +09:30
Jon
ddf3449b3f feat(core): Migration for feature_flag model reference
ref: #662 #659
2025-03-04 03:30:59 +09:30
Jon
95c5f271ba feat(core): url endpoints added for ticket comment category and ticket category notes
ref: #662 #665
2025-03-04 03:30:12 +09:30
Jon
db0cf389c3 feat(itam): disable model notes for model device os
ref: #662 #665
2025-03-04 03:29:34 +09:30
Jon
8b17ea54c7 feat(api): disable model notes for model auth token
ref: #662 #665
2025-03-04 03:29:16 +09:30
Jon
330d00a73d feat(core): disable model notes for model teamuser
ref: #662 #665
2025-03-04 03:28:56 +09:30
Jon
5f691748bc feat(core): disable model notes for model notes
ref: #662 #666 #667
2025-03-04 03:24:57 +09:30
Jon
4876919015 feat(core): Migrations for adding notes to ticket category and ticket comment category
ref: #662 #666 #667
2025-03-04 03:24:20 +09:30
Jon
55e30ab4f5 test(core): Ticket Comment Category Notes checks
ref: #662 closes #666
2025-03-04 03:24:08 +09:30
Jon
4d6438833d test(core): Ticket Category Notes checks
ref: #662 closes #667
2025-03-04 03:23:27 +09:30
Jon
5b97f5400f fix(core): Add ability to add notes for ticket comment category
ref: #662 #666
2025-03-04 03:23:04 +09:30
Jon
8a787a516f fix(core): Add ability to add notes for ticket category
ref: #662 #667
2025-03-04 03:22:04 +09:30
Jon
51013d12d3 test(app): Model test cases for api field rendering _urls.notes
ref: #662 closes #665
2025-03-04 03:21:30 +09:30
Jon
44a750f32b test(app): Model test cases for get_url_kwargs_notes function
ref: #662 #665
2025-03-04 03:20:39 +09:30
Jon
5938a51193 test(access): Correct Team notes url route name
ref: #662 #665
2025-03-04 03:18:50 +09:30
Jon
f833121c08 fix(core): Serializer _urls.notes URL generation now dynamic
ref: #662 #665
2025-03-04 03:17:31 +09:30
Jon
90a1e4baad feat(core): Add Feature Flag model reference
ref: #662 #659
2025-03-03 20:22:18 +09:30
Jon
20a1f69077 docs(admin): initial feature flags
ref: #662 #661 #496 closes #659
2025-03-02 02:51:19 +09:30
Jon
d79b13d98e docs(user): initial feature flags
ref: #662 #659 #661 #496
2025-03-02 02:39:37 +09:30
Jon
05cf5b2835 docs(user): Add devops module
ref: #662 closes #656
2025-03-02 02:14:27 +09:30
Jon
1edc398f41 fix(api): Dont attempt to access model.get_app_namespace if it doesnt exist
ref: #656 #662
2025-03-02 01:10:00 +09:30
Jon
adfeec5fef feat(devops): Add devops module to installed applications
ref: #662 #656
2025-03-02 00:48:38 +09:30
Jon
7fbe6fda95 test(devops): Feature Flag viewset unit Checks
ref: #662 #659
2025-03-02 00:37:13 +09:30
Jon
40f7f7739f test(devops): Feature Flag model Checks
ref: #662 #659
2025-03-02 00:37:03 +09:30
Jon
51807b4747 test(devops): Feature Flag api Checks
ref: #662 #659
2025-03-02 00:36:55 +09:30
Jon
ef1742c537 test(devops): Feature Flag tenancy object Checks
ref: #662 #659
2025-03-02 00:36:45 +09:30
Jon
1216092413 test(devops): Feature Flag viewset functional Checks
ref: #662 #659
2025-03-02 00:36:25 +09:30
Jon
ee23cb1f6e test(devops): Feature Flag serializer Checks
ref: #662 #659
2025-03-02 00:36:12 +09:30
Jon
158e8436d8 test(devops): Feature Flag History Checks
ref: #662 #661
2025-03-02 00:35:41 +09:30
Jon
235e4db5b6 feat(devops): Add Feature Flag viewset
ref: #662 #659
2025-03-02 00:34:57 +09:30
Jon
aa1cd3eda2 feat(devops): Add Feature Flag serializer
ref: #662 #659
2025-03-02 00:33:59 +09:30
Jon
1ed96ff9fc feat(devops): Add devops Navigation menu
ref: #662 #656
2025-03-02 00:32:47 +09:30
Jon
6fabdb6d17 feat(devops): Add devops module URL includes
ref: #662 #656
2025-03-02 00:32:03 +09:30
Jon
c6a38684db feat(devops): Add devops to permissions
ref: #662 #656
2025-03-02 00:29:23 +09:30
Jon
4ecc841462 feat(devops): DB Migrations for Feature Flag and History model
ref: #662 #661 #659
2025-03-02 00:28:38 +09:30
Jon
eda1fb673b feat(devops): Add Feature Flag History model
ref: #662 #661
2025-03-02 00:28:04 +09:30
Jon
d23e05ac7b feat(devops): Add Feature Flag model
ref: #662 #659
2025-03-02 00:27:43 +09:30
Jon
1818ee94e7 feat(access): add support for nested application namespaces
ref: #656 #662
2025-03-02 00:22:58 +09:30
Jon
9d88bf8827 feat(devops): Add devops module
ref: 656
2025-03-01 20:50:58 +09:30
fa03f7471b build: bump version 1.11.0 -> 1.12.0 2025-03-01 10:43:29 +00:00
Jon
a28a295d19 Merge pull request #652 from nofusscomputing/feature-next-release 2025-03-01 19:56:32 +09:30
Jon
f9abd0101e chore(api): add missing migration for authtoken.meta
ref: #652
2025-03-01 00:43:54 +09:30
Jon
053839af9a feat(api): Add delete column to AuthToken Table
ref: #652 nofusscomputing/centurion_erp_ui#88 closes #647
2025-02-28 23:52:01 +09:30
Jon
5abb4172a9 Merge pull request #651 from nofusscomputing/user-token-endpoint 2025-02-26 20:56:53 +09:30
Jon
d8cfff12ad build: update gitlab-ci to current head
ref: #651
2025-02-26 03:28:55 +09:30
Jon
526e9e876b docs(development): remove old history model pages and links
ref: #651
2025-02-26 03:05:02 +09:30
Jon
88163a954f feat(docker): Upgrade system packages on build
ref: #650
2025-02-26 02:52:51 +09:30
Jon
63184edc88 feat(api): AuthToken requires viewset get_back_url
ref: #650 #649
2025-02-26 01:59:27 +09:30
Jon
e3ec1a4da3 test(api): AuthToken ViewSet checks (unit)
ref: #650 #649
2025-02-26 01:24:52 +09:30
Jon
77316fc682 test(api): AuthToken API Field checks
ref: #650 #649
2025-02-26 01:01:48 +09:30
Jon
38208f3235 test(api): AuthToken Serializer checks
ref: #650 #649
2025-02-26 00:43:34 +09:30
Jon
04ffe056ae test(api): AuthToken ViewSet checks
ref: #650 #649
2025-02-26 00:06:06 +09:30
Jon
1372609e83 fix(api): correct usage of AuthToken.generate to a property
ref: #650 #649
2025-02-25 23:01:48 +09:30
Jon
c62f472546 feat(api): Add auth token api endpoint
ref: #650 #649
2025-02-25 22:33:54 +09:30
Jon
1b85ffca3e feat(settings): Add section title to auth tokens
ref: #650 #649
2025-02-25 22:33:32 +09:30
Jon
57cb5b4105 feat(settings): Add tokens url to user settings _urls
ref: #650 #649
2025-02-25 22:33:10 +09:30
Jon
8597c5e474 feat(api): Update Auth Token model for use with serializer
ref: #650 #649
2025-02-25 22:32:40 +09:30
Jon
eaabbb06c3 feat(api): Add user Auth Token viewset
ref: #650 #649
2025-02-25 22:31:07 +09:30
Jon
5bc7d585ad feat(api): Add user Auth Token serializer
ref: #650 #649
2025-02-25 22:30:32 +09:30
Jon
6c1690fccf feat(settings): Add page_layout attribute to User Settings
ref: #647 #648
2025-02-24 02:11:24 +09:30
f158bed904 build: bump version 1.10.1 -> 1.11.0 2025-02-21 11:36:36 +00:00
Jon
9503f88155 Merge pull request #570 from nofusscomputing/feature-next-release 2025-02-21 20:48:34 +09:30
Jon
79199e27c7 chore(core): Remove old history permissions from available permissions
ref: #605 #601
2025-02-21 02:31:00 +09:30
Jon
3058f7212a chore(core): Squash history commits
to reduce amount of migrations

ref: #605 closes #601
2025-02-21 02:30:48 +09:30
Jon
57d41d12a3 chore(core): Remove old history tests
ref: #605 #601 closes #46
2025-02-20 22:37:54 +09:30
Jon
fe997ee2f8 feat(core): Enable App settings History to save without specifying an organization
APP settings do not form part of an organization

ref: #605 closes #642
2025-02-20 22:37:17 +09:30
Jon
cecad1c368 fix(settings): App settings serializer fielad name does not exist
ref: #605 #642
2025-02-20 22:34:51 +09:30
Jon
df2120ab85 test(settings): History Entry checks for App Settings History
ref: #605 #642
2025-02-20 22:34:26 +09:30
Jon
63400c9ab6 test(settings): API Field Checks for App Settings History
ref: #605 #642
2025-02-20 22:34:02 +09:30
Jon
4ea29dedb9 feat(settings): save_history method added to App Settings
ref: #605 #642
2025-02-20 22:33:06 +09:30
Jon
701608b3ed feat(settings): History Model for App Settings Version added
ref: #605 #642
2025-02-20 22:32:46 +09:30
Jon
4bf54babb2 Merge pull request #605 from nofusscomputing/refactor-model-history 2025-02-20 06:58:06 +09:30
Jon
c1873e8c6d test: Model History not to save history on self
ref: #605 #602
2025-02-20 06:44:30 +09:30
Jon
31eded4f69 docs: remove api pages no longer required
ref: #605 #602
2025-02-20 06:38:12 +09:30
Jon
94737e7ae7 test(core): Correct lookup for model history test setup
ref: #605 #602
2025-02-20 06:28:50 +09:30
Jon
13d697e7de feat(core): Migration for history data to new history tables
ref: #605 closes #602
2025-02-20 06:07:36 +09:30
Jon
37aa9ff968 test(access): remove test cases for Team prarent_object
not required for model

ref: #605 #608
2025-02-20 05:41:00 +09:30
Jon
1663e98a1a fix(access): dont use organization property within organization model
ref: #605 #607
2025-02-20 05:40:01 +09:30
Jon
f765fe1fa0 test(access): History Entry checks for Team model
ref: #605 closes #608
2025-02-19 23:39:42 +09:30
Jon
1561b3a2e6 test(access): API Field Checks for Team History
ref: #605 #608
2025-02-19 23:39:28 +09:30
Jon
4174bacea1 feat(access): save_history method added to Team
ref: #605 #608
2025-02-19 23:39:00 +09:30
Jon
553f4d8579 feat(access): History Model for Team added
ref: #605 #608
2025-02-19 23:38:44 +09:30
Jon
72314ea2a4 test(access): History Entry checks for Organization model
ref: #605 closes #607
2025-02-19 23:38:17 +09:30
Jon
2c2ed724c3 test(access): API Field Checks for Organization History
ref: #605 #607
2025-02-19 23:37:28 +09:30
Jon
0275c7a211 feat(access): save_history method added to Organization
ref: #605 #607
2025-02-19 23:36:36 +09:30
Jon
b2f1fba86a feat(access): History Model for Organization added
ref: #605 #607
2025-02-19 23:36:22 +09:30
Jon
61207c55f9 Merge pull request #641 from nofusscomputing/refactor-access-models 2025-02-19 22:46:52 +09:30
Jon
cabb8d8c4e refactor(core): Update access imports to new path
ref: #641 closes #640
2025-02-19 22:34:55 +09:30
Jon
ef1f764b4b refactor(core): Update access imports to new path
ref: #640 #641
2025-02-19 22:20:41 +09:30
Jon
19ccc5af9b refactor: Update migrations imports to new path
ref: #640 #641
2025-02-19 22:17:49 +09:30
Jon
90dd1a3ded refactor(config_management): Update access imports to new path
ref: #640 #641
2025-02-19 22:02:34 +09:30
Jon
bc8af15d8b refactor(api): Update access imports to neew path
ref: #640 #641
2025-02-19 22:02:27 +09:30
Jon
3884253a2b refactor(settings): Update access imports to new path
ref: #640 #641
2025-02-19 21:55:05 +09:30
Jon
a9698eada1 refactor(project_management): Update access imports to new path
ref: #640 #641
2025-02-19 21:49:46 +09:30
Jon
e91ba06256 refactor(itim): Update access imports to new path
ref: #640 #641
2025-02-19 21:41:49 +09:30
Jon
c506925f6e refactor(itam): Update access imports to new path
ref: #640 #641
2025-02-19 21:30:37 +09:30
Jon
b007e05386 refactor(core): Update access imports to new path
ref: #640 #641
2025-02-19 21:11:01 +09:30
Jon
cadcb8b5d2 refactor(config_management): Update access imports to new path
ref: #640 #641
2025-02-19 20:55:30 +09:30
Jon
cc6d577978 refactor(assistance): Update access imports to new path
ref: #640 #641
2025-02-19 20:50:40 +09:30
Jon
7f2eaaca6a refactor(base): Update access imports to new path
ref: #640 #641
2025-02-19 20:42:44 +09:30
Jon
9b0d09e001 refactor(api): Update access imports to neew path
ref: #640 #641
2025-02-19 20:39:42 +09:30
Jon
77226f75fc refactor(access): Update access imports to neew path
ref: #640 #641
2025-02-19 20:34:28 +09:30
Jon
aeff3f610c refactor(access): Move models to their own file
ref: #640 #641
2025-02-19 20:33:41 +09:30
Jon
635159f364 test: Fix History API checks for kb
ref: #605 #602
2025-02-18 04:13:40 +09:30
Jon
c0e8769781 test: Fix History API checks for project milestone
ref: #605 #602
2025-02-18 04:13:40 +09:30
Jon
04491fbc34 test: Fix History Entry checks for models
ref: #605 #602
2025-02-18 04:13:39 +09:30
Jon
89e6bc362c fix(project_management): Project milestone is not a child model
ref: #605 #631
2025-02-18 04:13:39 +09:30
Jon
79511d0270 test(config_management): History Entry checks for Config_group_hosts model
ref: #605 closes #637
2025-02-18 04:13:39 +09:30
Jon
69bb6f149f test(settings): History Entry checks for External Link model
ref: #605 closes #635
2025-02-18 04:13:39 +09:30
Jon
381ceb723d test(project_management): History Entry checks for Project Type model
ref: #605 closes #634
2025-02-18 04:13:39 +09:30
Jon
67e010e001 test(project_management): History Entry checks for Project State model
ref: #605 closes #632
2025-02-18 04:13:39 +09:30
Jon
1a1317b584 test(project_management): History Entry checks for Project Milestone model
ref: #605 closes #631
2025-02-18 04:13:39 +09:30
Jon
2a3051c2ae test(project_management): History Entry checks for Project model
ref: #605 closes #630
2025-02-18 04:13:39 +09:30
Jon
dcc86a824a test(itim): History Entry checks for Service model
ref: #605 closes #629
2025-02-18 04:13:39 +09:30
Jon
44a6d1da2d test(itim): History Entry checks for Cluster Type model
ref: #605 closes #627
2025-02-18 04:13:39 +09:30
Jon
bd06be083b test(itim): History Entry checks for Port model
ref: #605 closes #628
2025-02-18 04:13:39 +09:30
Jon
2a14cd6119 test(itim): History Entry checks for Cluster model
ref: #605 closes #626
2025-02-18 04:13:39 +09:30
Jon
334dbfdf7f test(itam): History Entry checks for Software Version model
ref: #605 closes #625
2025-02-18 04:13:39 +09:30
Jon
0c961d2709 test(itam): History Entry checks for Software Category model
ref: #605 closes #624
2025-02-18 04:13:39 +09:30
Jon
99900a2e90 test(itam): History Entry checks for Software model
ref: #605 closes #623
2025-02-18 04:13:39 +09:30
Jon
ede4009933 test(itam): History Entry checks for Operating System Version model
ref: #605 closes #622
2025-02-18 04:13:39 +09:30
Jon
1323531254 test(itam): History Entry checks for Operating System model
ref: #605 closes #621
2025-02-18 04:13:39 +09:30
Jon
e9022edb1d test(itam): History Entry checks for Device Type model
ref: #605 closes #620
2025-02-18 04:13:39 +09:30
Jon
749fe57d4f test(itam): History Entry checks for Device OS model
ref: #605 closes #618
2025-02-18 04:13:39 +09:30
Jon
5e9f2a4763 test(itam): History Entry checks for Device Model model
ref: #605 closes #617
2025-02-18 04:13:39 +09:30
Jon
edb5148b7d test(itam): History Entry checks for Device model
ref: #605 closes #616
2025-02-18 04:13:39 +09:30
Jon
3d98f54b3c test(core): History Entry checks for Ticket Comment Category model
ref: #605 closes #615
2025-02-18 04:13:39 +09:30
Jon
126516a1ff test(core): History Entry checks forTicket Category model
ref: #605 closes #614
2025-02-18 04:13:39 +09:30
Jon
7169bb1618 test(config_management): History Entry checks for Config Groups Software model
ref: #605 closes #612
2025-02-18 04:13:39 +09:30
Jon
9cd72e604e test(config_management): History Entry checks for Config Groups model
ref: #605 closes #611
2025-02-18 04:13:39 +09:30
Jon
135fba1f50 test(assistance): History Entry checks for Knowledge base category model
ref: #605 closes #610
2025-02-18 04:13:39 +09:30
Jon
80fa12b747 test(assistance): History Entry checks for Knowledge base model
ref: #605 closes #609
2025-02-18 04:13:39 +09:30
Jon
77786d28e7 test(itam): Device Software History Entry checks
ref: #605 closes #619
2025-02-18 04:13:39 +09:30
Jon
2775e0a01b test(core): Manufacturer History Entry checks
ref: #605 closes #613
2025-02-18 04:13:39 +09:30
Jon
dd312c6351 fix(core): Child models on delete must make model field null
ref: #605 #602
2025-02-18 04:13:39 +09:30
Jon
91c964b581 fix(project_management): Project Milestone History is a primaryu model
ref: #605 #631
2025-02-18 04:13:39 +09:30
Jon
db5ce2352e test(core): Model History Entries Test Suite
ref: #605 #602
2025-02-18 04:13:39 +09:30
Jon
5c3c26c318 fix(core): When a child model is deleted ensure entry is still created on parent model history
ref: #605 #601
2025-02-18 04:13:39 +09:30
Jon
f77d778cb7 test(core): History Model Unit test cases for model and tenancy checks
ref: #605 #602
2025-02-18 04:13:39 +09:30
Jon
9731cb0eaa test(settings): API Field Checks for External Links History
ref: #605 #635
2025-02-18 04:13:38 +09:30
Jon
e31bc90869 test(project_management): API Field Checks for Project Type History
ref: #605 #634
2025-02-18 04:13:38 +09:30
Jon
a5156bd476 test(project_management): API Field Checks for Project State History
ref: #605 #632
2025-02-18 04:13:38 +09:30
Jon
675f46ce66 test(project_management): API Field Checks for Project Milestone History
ref: #605 #631
2025-02-18 04:13:38 +09:30
Jon
ccb85b16ae test(project_management): API Field Checks for Project History
ref: #605 #630
2025-02-18 04:13:38 +09:30
Jon
9d7750ce44 test(itim): API Field Checks for Service History
ref: #605 #629
2025-02-18 04:13:38 +09:30
Jon
d10faa4b3c test(itim): API Field Checks for Port History
ref: #605 #628
2025-02-18 04:13:38 +09:30
Jon
7028cbf02b test(itim): API Field Checks for Cluster Type History
ref: #605 #627
2025-02-18 04:13:38 +09:30
Jon
3a2d66a213 test(itim): API Field Checks for Cluster History
ref: #605 #626
2025-02-18 04:13:38 +09:30
Jon
9f03b52f58 test(core): API Field Checks for Ticket Comment Category History
ref: #605 #615
2025-02-18 04:13:38 +09:30
Jon
38ff4b9ee7 test(core): API Field Checks for Ticket Category History
ref: #605 #614
2025-02-18 04:13:38 +09:30
Jon
a70a2019b4 test(config_management): API Field Checks for Config Group Software History
ref: #605 #612
2025-02-18 04:13:38 +09:30
Jon
edef6aa2bc test(config_management): API Field Checks for Config Group Hosts History
ref: #605 #637
2025-02-18 04:13:38 +09:30
Jon
4d02276f55 test(config_management): API Field Checks for Config Group History
ref: #605 #611
2025-02-18 04:13:38 +09:30
Jon
2a2ce8e2e0 test(assistance): API Field Checks for Knowledge base category History
ref: #605 #610
2025-02-18 04:13:38 +09:30
Jon
5b0f1b9b82 test(assistance): API Field Checks for Knowledge base History
ref: #605 #609
2025-02-18 04:13:38 +09:30
Jon
58cca3e954 test(itam): API Field Checks for Software Version History
ref: #605 #625
2025-02-18 04:13:38 +09:30
Jon
1ddfd852d4 test(itam): API Field Checks for Software Category History
ref: #605 #624
2025-02-18 04:13:38 +09:30
Jon
22eec00f40 test(itam): API Field Checks for Software History
ref: #605 #623
2025-02-18 04:13:38 +09:30
Jon
23fe7e189e test(itam): API Field Checks for Operating System Version History
ref: #605 #622
2025-02-18 04:13:38 +09:30
Jon
f4edbe80d5 test(itam): API Field Checks for Operating System History
ref: #605 #621
2025-02-18 04:13:38 +09:30
Jon
076b35dedc test(itam): API Field Checks for Device Type History
ref: #605 #620
2025-02-18 04:13:38 +09:30
Jon
4432591168 test(itam): API Field Checks for Device OS History
ref: #605 #618
2025-02-18 04:13:38 +09:30
Jon
bb8a3ba716 test(itam): API Field Checks for Device Model History
ref: #605 #617
2025-02-18 04:13:38 +09:30
Jon
af71907264 test(itam): API Field Checks for Device History
ref: #605 #616
2025-02-18 04:13:38 +09:30
Jon
53d2da43ef test(core): Unit Test Suite for History Model API field checks urls can either be str or hyperlink
ref: #605 #602 #46
2025-02-18 04:13:38 +09:30
Jon
c226a0a910 test(itam): API Field Checks for Device Software History
ref: #605 #619
2025-02-18 04:13:38 +09:30
Jon
4d70925a3d test(core): API Field Checks for Manufacturer History
ref: #605 #613
2025-02-18 04:13:38 +09:30
Jon
6c61ff0121 test(core): API Field Checks for Model History
ref: #605 #601 #602 #46
2025-02-18 04:13:38 +09:30
Jon
48966b9009 test(core): Unit Test Suite for History Model API field checks
ref: #605 #602 #46
2025-02-18 04:13:38 +09:30
Jon
9a428c4e98 feat(core): add org field History Model api rendering
ref: #605 #602  #455
2025-02-18 04:13:38 +09:30
Jon
1ef90e96e0 test(core): Functional Test for History Model APIPermission updated to cater for tenancy obj
ref: #605 #602 closes #455
2025-02-18 04:13:37 +09:30
Jon
74f652aaf4 test(core): Functional Test for History Model API Permissions and Metadata
ref: #605 #602
2025-02-18 04:13:37 +09:30
Jon
c5999c2e04 fix(core): when fetching url_kwargs for model history, make it dynamic for related field name
ref: #605 #602
2025-02-18 04:13:37 +09:30
Jon
46e7f3fada fix(core): Xorrect logic for determining view_action
ref: #605 #602
2025-02-18 04:13:37 +09:30
Jon
afc1c6b6fc test(core): Unit Test for History Model Viewset
ref: #605 #602
2025-02-18 04:13:37 +09:30
Jon
1b5044cc42 feat(core): Show the model name within history
ref: #605 #601
2025-02-18 04:13:37 +09:30
Jon
413ddbc59b fix(core): dynamically search for history object name
ref: #605 #601
2025-02-18 04:13:37 +09:30
Jon
7e64e23d32 feat(project_management): Project Milestone added to modelhistory.child_history_models
ref: #605 #631
2025-02-18 04:13:37 +09:30
Jon
3aacc17f54 feat(settings): History Model migrations for External Link
ref: #605 #635
2025-02-18 04:13:37 +09:30
Jon
1485183aab feat(settings): save_history method added to External Link
ref: #605 #635
2025-02-18 04:13:37 +09:30
Jon
14e81e0bdb feat(settings): History Model for External Link added
ref: #605 #635
2025-02-18 04:13:37 +09:30
Jon
a66c441f5a feat(project_management): History Model migrations for Project Type
ref: #605 #634
2025-02-18 04:13:37 +09:30
Jon
1cf844d22d feat(project_management): save_history method added to Project Type
ref: #605 #634
2025-02-18 04:13:37 +09:30
Jon
aaba1c5ad6 feat(project_management): History Model for Project TYpe added
ref: #605 #634
2025-02-18 04:13:37 +09:30
Jon
2b1f8a6e05 feat(project_management): History Model migrations for Project State
ref: #605 #632
2025-02-18 04:13:37 +09:30
Jon
6cd5698f6e feat(project_management): save_history method added to Project State
ref: #605 #632
2025-02-18 04:13:37 +09:30
Jon
eb137c7ae3 feat(project_management): History Model for Project State added
ref: #605 #632
2025-02-18 04:13:37 +09:30
Jon
9ca5cdb88a feat(project_management): History Model migrations for Project Milestone
ref: #605 #631
2025-02-18 04:13:37 +09:30
Jon
0ec202d633 feat(project_management): save_history method added to Project Milestonr
ref: #605 #631
2025-02-18 04:13:37 +09:30
Jon
18ba0704ec feat(project_management): History Model for Project Milestone added
ref: #605 #631
2025-02-18 04:13:37 +09:30
Jon
70d24b1094 feat(project_management): History Model migrations for Project
ref: #605 #630
2025-02-18 04:13:37 +09:30
Jon
a9419fd742 feat(project_management): save_history method added to Project
ref: #605 #630
2025-02-18 04:13:37 +09:30
Jon
e17a0ac5e8 feat(project_management): History Model for Project added
ref: #605 #630
2025-02-18 04:13:37 +09:30
Jon
09bff87030 feat(itim): History Model migrations for Service
ref: #605 #628
2025-02-18 04:13:37 +09:30
Jon
1b1f9840e3 feat(itim): save_history method added to Service
ref: #605 #628
2025-02-18 04:13:37 +09:30
Jon
8802d396c5 feat(itim): History Model for Service added
ref: #605 #629
2025-02-18 04:13:37 +09:30
Jon
87f73ac5b0 feat(itim): History Model migrations for Port
ref: #605 #628
2025-02-18 04:13:37 +09:30
Jon
36de9817b5 feat(itim): save_history method added to Port
ref: #605 #628
2025-02-18 04:13:37 +09:30
Jon
a3a33085c8 feat(itim): History Model for Port added
ref: #605 #628
2025-02-18 04:13:37 +09:30
Jon
1c601f5ce1 feat(itim): History Model migrations for Cluster Type
ref: #605 #627
2025-02-18 04:13:37 +09:30
Jon
6b10795b2d feat(itim): save_history method added to Cluster TYpe
ref: #605 #627
2025-02-18 04:13:36 +09:30
Jon
cdf3068b50 feat(itim): History Model for Cluster Type added
ref: #605 #627
2025-02-18 04:13:36 +09:30
Jon
73d5ac6b10 feat(itim): History Model migrations for Cluster
ref: #605 #625
2025-02-18 04:13:36 +09:30
Jon
18cbd71d28 feat(itim): save_history method added to Cluster
ref: #605 #626
2025-02-18 04:13:36 +09:30
Jon
cf52db1434 feat(itim): History Model for Cluster added
ref: #605 #626
2025-02-18 04:13:36 +09:30
Jon
403b5226cb test(itam): remove test cases for os version model.parent_object as it's not required
ref: #605 #622
2025-02-18 04:13:36 +09:30
Jon
fcdb2fe057 feat(itam): History Model migrations for Software Version
ref: #605 #625
2025-02-18 04:13:36 +09:30
Jon
e04e3e4572 feat(itam): save_history method added to Software Version
ref: #605 #625
2025-02-18 04:13:36 +09:30
Jon
4c14e6db3f feat(itam): History Model for Software Version added
ref: #605 #625
2025-02-18 04:13:36 +09:30
Jon
e254ec6e78 feat(itam): History Model migrations for Software Category
ref: #605 #624
2025-02-18 04:13:36 +09:30
Jon
f815df41c4 feat(itam): save_history method added to Software Category
ref: #605 #624
2025-02-18 04:13:36 +09:30
Jon
13425c432b feat(itam): History Model for Software Category added
ref: #605 #624
2025-02-18 04:13:36 +09:30
Jon
d273c35baa feat(itam): History Model migrations for Software
ref: #605 #623
2025-02-18 04:13:36 +09:30
Jon
c587ae7102 feat(itam): save_history method added to Software
ref: #605 #623
2025-02-18 04:13:36 +09:30
Jon
cafaf3178a feat(itam): History Model for Software added
ref: #605 #623
2025-02-18 04:13:36 +09:30
Jon
947a9c88fd feat(itam): History Model migrations for Operating System Version
ref: #605 #622
2025-02-18 04:13:36 +09:30
Jon
ec06c417e1 feat(itam): save_history method added to Operating System Version
ref: #605 #622
2025-02-18 04:13:36 +09:30
Jon
f954b2507c feat(itam): History Model for Operating System Version added
ref: #605 #622
2025-02-18 04:13:36 +09:30
Jon
1173029981 feat(itam): History Model migrations for Device Type
ref: #605 #620
2025-02-18 04:13:36 +09:30
Jon
fa0a81e835 feat(itam): save_history method added to Device Type
ref: #605 #620
2025-02-18 04:13:36 +09:30
Jon
e8e3939de7 feat(itam): History Model for Device Type added
ref: #605 #620
2025-02-18 04:13:36 +09:30
Jon
2d7e621251 feat(itam): History Model migrations for Device Operating System
ref: #605 #618
2025-02-18 04:13:36 +09:30
Jon
9132a8f62c feat(itam): save_history method added to Device Operating System
ref: #605 #618
2025-02-18 04:13:36 +09:30
Jon
cda3730943 feat(itam): History Model for Device Operating System added
ref: #605 #618
2025-02-18 04:13:36 +09:30
Jon
70db017ac2 feat(itam): History Model migrations for Operating System
ref: #605 #621
2025-02-18 04:13:36 +09:30
Jon
8055bd79dd feat(itam): save_history method added to Operating System
ref: #605 #621
2025-02-18 04:13:35 +09:30
Jon
a73f5feccc feat(itam): History Model migrations for Operating System
ref: #605 #621
2025-02-18 04:13:35 +09:30
Jon
08a3042866 feat(itam): History Model migrations for Device Software
ref: #605 #619
2025-02-18 04:13:35 +09:30
Jon
86116f4563 feat(itam): History Model for Device Software added
ref: #605 #619
2025-02-18 04:13:35 +09:30
Jon
92fd22ae5c feat(itam): save_history method added to Device
ref: #605 #616
2025-02-18 04:13:35 +09:30
Jon
6ccb63c921 feat(itam): History Model migrations for Device Model
ref: #605 #617
2025-02-18 04:13:35 +09:30
Jon
4e5d2378d8 feat(itam): save_history method added to Device Model
ref: #605 #617
2025-02-18 04:13:35 +09:30
Jon
290a7de736 feat(itam): History Model for Device Model added
ref: #605 #617
2025-02-18 04:13:35 +09:30
Jon
8673862cd3 fix(config_management): Remove parent property from config groups
ref: #605 #611
2025-02-18 04:13:35 +09:30
Jon
1de5c634d0 feat(core): History Model migrations for Ticket Comment Category
ref: #605 #615
2025-02-18 04:13:35 +09:30
Jon
f5d59c703d feat(core): save_history method added to Ticket Comment Category
ref: #605 #615
2025-02-18 04:13:35 +09:30
Jon
0ee8369e24 feat(core): History Model for Ticket Comment Category added
ref: #605 #615
2025-02-18 04:13:35 +09:30
Jon
a67c3fb919 feat(config_management): Child History Models added to child model lists for config group hosts and software
ref: #605 #611 #637
2025-02-18 04:13:35 +09:30
Jon
4dd19ba22f fix(tests): Correct Permission Import due to removing from access.models
ref: #605 #601
2025-02-18 04:13:35 +09:30
Jon
d55ecabb2d feat(core): History Model migrations for Ticket Category
ref: #605 #614
2025-02-18 04:13:35 +09:30
Jon
a0ad877830 feat(core): save_history method added to Ticket Category
ref: #605 #614
2025-02-18 04:13:35 +09:30
Jon
9f192ef28d feat(core): History Model for Ticket Category added
ref: #605 #614
2025-02-18 04:13:35 +09:30
Jon
edf0fca794 feat(core): History Model migrations for Manufacturer
ref: #605 #613
2025-02-18 04:13:35 +09:30
Jon
3f4c8e93fc feat(core): save_history method added to Manufacturer
ref: #605 #613
2025-02-18 04:13:34 +09:30
Jon
1c7b63c4d0 feat(core): History Model for Manufacturer added
ref: #605 #613
2025-02-18 04:13:34 +09:30
Jon
aa43c2e46a feat(config_management): save_history method added to Config Group Software
ref: #605 #637
2025-02-18 04:13:34 +09:30
Jon
4d9e06c55b feat(config_management): save_history method added to Config Group Hosts
ref: #605 #637
2025-02-18 04:13:34 +09:30
Jon
2027c4fd0e feat(config_management): save_history method added to Config Groups
ref: #605 #611
2025-02-18 04:13:34 +09:30
Jon
d708f85883 feat(assistance): save_history method added to Knowledge base
ref: #605 #610
2025-02-18 04:13:34 +09:30
Jon
1d6ec4023a feat(assistance): save_history method added to Knowledge base category
ref: #605 #610
2025-02-18 04:13:34 +09:30
Jon
2059d014d7 feat(config_management): History Model migrations for Config Groupse + children
ref: #605 #611 #612 #637
2025-02-18 04:13:34 +09:30
Jon
9493543b92 feat(config_management): History Model for Config Group Software added
ref: #605 #612
2025-02-18 04:13:34 +09:30
Jon
589c7fab26 feat(config_management): History Model for Config Group Hosts added
ref: #605 #637
2025-02-18 04:13:34 +09:30
Jon
740d33ece1 feat(config_management): History Model for Config Groups added
ref: #605 #611
2025-02-18 04:13:34 +09:30
Jon
0a364f0f7f feat(assistance): History Model migrations for Knowledge base + children
ref: #605 #609 #610
2025-02-18 04:13:34 +09:30
Jon
f8a9e7dcad feat(assistance): History Model for Knowledge base category added
ref: #605 #610
2025-02-18 04:13:34 +09:30
Jon
b77bb3d10c feat(assistance): History Model for Knowledge base added
ref: #605 #609
2025-02-18 04:13:34 +09:30
Jon
d21fc512be test(core): disable hisotry viewset function test
ref: #602 #605
2025-02-18 04:13:34 +09:30
Jon
6852aa4748 feat(itam): Add device history model
ref: #605 #616
2025-02-18 04:13:34 +09:30
Jon
723bc7aed4 test(core): correct kwargs for history tests
ref: #602 #605
2025-02-18 04:13:34 +09:30
Jon
358c1720d5 fix(project_management): project Model serializer must inherit common serializer
ref: #601 #605
2025-02-18 04:13:34 +09:30
Jon
9b8f644261 chore(itam): device operating system+software get_url attribute "obj" renamed to match others "item"
ref: #601 #605
2025-02-18 04:13:34 +09:30
Jon
57060975b0 chore: remove old history model access from original UI and API V1
ref: #601 #605 closes #606
2025-02-18 04:13:34 +09:30
Jon
24e4c95928 fix(core): History audit objects must be a valid dict
ref: #601 #605 fixes #490
2025-02-18 04:13:34 +09:30
Jon
8f15b8bf20 chore(itam): device operating system get_url attribute "obj" renamed to match others "item"
ref: #601 #605
2025-02-18 04:13:34 +09:30
Jon
0d6bdad29b fix(api): history app names can contain an underscore
ref: #601 #605
2025-02-18 04:13:34 +09:30
Jon
4b2be4855b docs(development): History model update
ref: #601 #605
2025-02-18 04:13:34 +09:30
Jon
b738c4be20 feat(core): History view to only display objects from the model being requested
ref: #602 #605
2025-02-18 04:13:34 +09:30
Jon
8512bff4f1 fix(core): when saving history, use audit_model for content type
ref: #602 #605
2025-02-18 04:13:34 +09:30
Jon
507db1051c test(core): Remove old history model viewset tests
ref: #602 #605
2025-02-18 04:13:33 +09:30
Jon
7cd4cb965b refactor(core): move get_url to common serializer
reduces duplicated code

ref: #602 #605
2025-02-18 04:13:33 +09:30
Jon
460bf40175 refactor(api): Update history url kwargs to use vals from model._meta
ref: #602 #605
2025-02-18 04:13:33 +09:30
Jon
93e7a9097f docs(core): correct history_save code docs
ref: #602 #605
2025-02-18 04:13:33 +09:30
Jon
1541a89937 fix(core): add missing functions for fetching item url
ref: #602 #605
2025-02-18 04:13:33 +09:30
Jon
25373fc5b6 test: Disable Old History Model test suites
ref: #601 #602 #605
2025-02-18 04:13:33 +09:30
Jon
a9a5c189d2 feat(core): Add new history model to History Serializer
ref: #601 #602 #605
2025-02-18 04:13:33 +09:30
Jon
f2a995d277 feat(core): Add new history model
ref: #602 #605
2025-02-18 04:13:33 +09:30
Jon
75b5f48f9e docs(development): Add model history
ref: #601 #605
2025-02-18 04:13:33 +09:30
Jon
bb021a00d9 feat(development): lint for un-used imports
ref: #570
2025-02-18 04:12:59 +09:30
Jon
db07262623 feat(development): add pylit settings
ref: #570
2025-02-18 04:12:59 +09:30
Jon
6f94c95221 feat(core): added new history model
ref: #570 #602
2025-02-18 04:12:59 +09:30
Jon
103f25be1d fix(project_management): Opened by field set to read only for project task ticket
ref: #570
2025-02-18 04:12:59 +09:30
Jon
cc02976c3a fix(itim): Opened by field set to read only for problem ticket
ref: #570
2025-02-18 04:12:59 +09:30
Jon
af4a1d52c5 fix(itim): Opened by field set to read only for incident ticket
ref: #570
2025-02-18 04:12:59 +09:30
Jon
7ac56a35ae fix(itim): Opened by field set to read only for change ticket
ref: #570
2025-02-18 04:12:59 +09:30
Jon
030560d697 fix(assistance): Opened by field set to read only for request ticket
ref: #570
2025-02-18 04:12:59 +09:30
Jon
b7dd2dfaba refactor(core): superuser changed from import to triage access
ref: #570
2025-02-18 04:12:59 +09:30
Jon
008a879e6f docs(user): Use a table to show markdown model tags
ref: #570
2025-02-18 04:12:59 +09:30
Jon
71382a4689 docs: remove links to old notes
ref: #570
2025-02-18 04:12:59 +09:30
Jon
1963bf0817 feat(api): Device Software Viewset requires its own function to obtain the model view serializer
ref: #578 #477
2025-02-18 04:12:59 +09:30
Jon
31a45a1ab1 feat(api): Ticket Comment Viewset requires its own function to obtain the model view serializer
ref: #578 #477
2025-02-18 04:12:59 +09:30
Jon
f7818fe2e8 feat(api): Ticket Viewset requires its own function to obtain the model view serializer
ref: #578 #477
2025-02-18 04:12:59 +09:30
Jon
16388f0a10 feat(api): Always use a models View serializer for the response
ref: #477 #579 closes #578
2025-02-18 04:12:59 +09:30
Jon
2e0b835af9 test(core): Ensure that when parent_ticket changes on a ticket an action comment is created
ref: #495 #558 #577
2025-02-18 04:12:59 +09:30
Jon
81e856967b fix(core): Ensure that if the parent ticket changes, that the logic caters for none
ref: #558 #577
2025-02-18 04:12:59 +09:30
Jon
348b2f270e test(core): Confirm on category change to ticket that an action comment is created
ref: #577 closes #537
2025-02-18 04:12:59 +09:30
Jon
9a4521a604 fix(assistance): Category can be empty for Project Task Ticket
ref: #537 #577
2025-02-18 04:12:59 +09:30
Jon
83dab570a8 fix(assistance): Category can be empty for Problem Ticket
ref: #537 #577
2025-02-18 04:12:59 +09:30
Jon
a189a60e1b fix(assistance): Category can be empty for Incident Ticket
ref: #537 #577
2025-02-18 04:12:59 +09:30
Jon
91bea05496 fix(assistance): Category can be empty for Change Ticket
ref: #537 #577
2025-02-18 04:12:59 +09:30
Jon
ed41e0b8a9 fix(assistance): Category can be empty for Request Ticket
ref: #537 #577
2025-02-18 04:12:59 +09:30
Jon
64ca3415d4 fix(core): Ticket Action comment for category change must use category field
ref: #537 #577
2025-02-18 04:12:59 +09:30
Jon
ec6bc7d03a feat(core): Add logic to ensure when organization changes, an action comment is created
ref: #577 closes #558
2025-02-18 04:12:59 +09:30
Jon
0d1a0bff19 feat(core): Add logic to ensure when parnet ticket changes, an action comment is created
ref: #558 #577
2025-02-18 04:12:58 +09:30
Jon
cc46a1426d refactor(core): Ticket action comment logic only requires a single check
ref: #577 #558
2025-02-18 04:12:58 +09:30
Jon
30b24a1969 docs(development): remove old notes docs
ref: #570
2025-02-18 04:12:58 +09:30
Jon
ad27501334 chore: update new model tempplate
ref: #605
2025-02-18 04:12:30 +09:30
Jon
1109beb8e9 chore: issue template new model added
ref: #0
2025-02-16 08:43:04 +09:30
8b7550f573 build: bump version 1.10.0 -> 1.10.1 2025-02-14 12:24:21 +00:00
Jon
4f2a28bb52 fix(python): Dont use system TimeZone data, use python zoneinfo module zone data
ref: fixes #603
2025-02-14 21:41:21 +09:30
33c589a1a0 build: bump version 1.9.0 -> 1.10.0 2025-02-10 09:27:27 +00:00
Jon
0a21c37645 fix(core): Dont attempt to access parent_ticket field during ticket validation if it does not exist
ref: #559 #507
2025-02-10 18:42:31 +09:30
Jon
e4dac45d2e Merge pull request #522 from nofusscomputing/feature-next-release 2025-02-10 18:11:16 +09:30
Jon
c9eefc2eb3 Merge pull request #554 from nofusscomputing/ticket-circular-dependency-check 2025-02-10 17:45:07 +09:30
Jon
68d3c1ff26 test(settings): Test User Settings API render to ensure browser_model exists and is the correct type
ref: #554 closes #507
2025-02-10 17:32:59 +09:30
Jon
e5680cdbce test(settings): Test User Settings model to ensure browser_mode field exists
ref: #554 #507
2025-02-10 17:31:42 +09:30
Jon
067dd98eee feat(settings): Provide user with the ability to set browser mode
ref: #554 #481 #507 nofusscomputing/centurion_erp_ui#71
2025-02-10 17:24:52 +09:30
Jon
b153f648f9 feat(core): Parent Ticket validation added to ticket serializer
ref: #554 closes #517
2025-02-10 16:39:00 +09:30
Jon
062e846875 feat(core): Add to ticket endpoint the ability to filter using parent_ticket
ref: #517 #554
2025-02-10 16:19:47 +09:30
Jon
0e1f778b80 feat(core): Add to ticket model a function for circular dependecy check of parent ticket
ref: #517 #554
2025-02-10 16:19:18 +09:30
Jon
aca32b14be Merge pull request #525 from nofusscomputing/model_notes 2025-02-09 22:02:08 +09:30
Jon
16076f0ca3 chore(core): Remove old notes model test suites
ref: #525 #389
2025-02-09 21:48:23 +09:30
Jon
6d69b72368 feat(core): Migrate Notes data to new table
ref: #525 #389 #349 closes #547
2025-02-09 21:47:56 +09:30
Jon
d4c6c08710 chore(core): REmove modelnotes permission from permissions list
ref: #525 #389
2025-02-09 20:55:38 +09:30
Jon
05d4c4a94d refactor: Squash migrations so there is less of them for model notes
ref: #525 #389
2025-02-09 20:40:25 +09:30
Jon
4d5f029913 docs(core): add model notes
ref: #525
2025-02-09 20:04:58 +09:30
Jon
51e7f875a2 test(access): Team Note Model Check object requires org
ref: #525 #527
2025-02-09 20:01:14 +09:30
Jon
b17bc5af75 feat(project_management): Add notes tab to Project Milestone details page
ref: #525 #542
2025-02-09 19:45:11 +09:30
Jon
80db9022b7 feat(itam): Add notes tab to Software Version details page
ref: #525 #541
2025-02-09 19:44:42 +09:30
Jon
288abb5373 feat(itam): Add notes tab to Operating System details page
ref: #525 #531
2025-02-09 19:44:17 +09:30
Jon
f06c9f6091 docs: add model test suite
ref: #525
2025-02-09 19:36:21 +09:30
Jon
d55010d63f test(settings): External Links Note Model Checks
ref: #525 closes #545
2025-02-09 19:35:06 +09:30
Jon
eeb7075f83 test(project_management): Project Type Note Model Checks
ref: #525 closes #544
2025-02-09 19:34:42 +09:30
Jon
1c34fbad08 test(project_management): Project State Note Model Checks
ref: #525 closes #543
2025-02-09 19:34:29 +09:30
Jon
4549379e62 test(project_management): Project Note Model Checks
ref: #525 closes #335
2025-02-09 19:34:12 +09:30
Jon
64fd692d9c test(project_management): Project Milestone Note Model Checks
ref: #525 closes #542
2025-02-09 19:34:00 +09:30
Jon
795f029c75 test(itim): Service Note Model Checks
ref: #525 closes #534
2025-02-09 19:33:33 +09:30
Jon
a091be7b5e test(itim): Port Note Model Checks
ref: #525 closes #536
2025-02-09 19:33:12 +09:30
Jon
a1c9533555 test(itim): Cluster Type Note Model Checks
ref: #525 closes #535
2025-02-09 19:32:47 +09:30
Jon
20f52d856b test(itim): Cluster Note Model Checks
ref: #525 closes #533
2025-02-09 19:32:27 +09:30
Jon
6e296a3713 test(itam): Software Version Note Model Checks
ref: #525 closes #541
2025-02-09 19:31:57 +09:30
Jon
58b73b9b29 test(itam): Software Note Model Checks
ref: #525 closes #532
2025-02-09 19:31:43 +09:30
Jon
cd65d8e93d test(itam): Software Category Note Model Checks
ref: #525 closes #540
2025-02-09 19:31:17 +09:30
Jon
f26b0706ae test(itam): Operating System Version Note Model Checks
ref: #525 closes #539
2025-02-09 19:30:31 +09:30
Jon
1a0839a2c8 test(itam): Operating System Note Model Checks
ref: #525 closes #531
2025-02-09 19:30:14 +09:30
Jon
cc0f92e132 test(itam): Device Type Note Model Checks
ref: #525 closes #538
2025-02-09 19:29:40 +09:30
Jon
b14262fcad test(itam): Device Note Model Checks
ref: #525 closes #524
2025-02-09 19:28:59 +09:30
Jon
1474f47087 test(itam): Device Model Note Model Checks
ref: #525 closes #523
2025-02-09 19:28:46 +09:30
Jon
e56007d4b1 test(core): Manufacturer Note Model Checks
ref: #525 closes #530
2025-02-09 19:28:21 +09:30
Jon
0602070adb test(config_management): Config Group Note Model Checks
ref: #525 closes #529
2025-02-09 19:28:02 +09:30
Jon
760463705b test(assistance): KB Note Model Checks
ref: #525 closes #528
2025-02-09 19:27:37 +09:30
Jon
8eeb5780c6 test(assistance): KB Category Note Model Checks
ref: #525 closes #546
2025-02-09 19:27:25 +09:30
Jon
7b6d6935d4 test(access): Team Note Model Checks
ref: #525 closes #527
2025-02-09 19:27:05 +09:30
Jon
1cec44f7bd test(access): Organization Note Model Checks
ref: #525 closes #526
2025-02-09 19:26:38 +09:30
Jon
51ec6cb0e5 test(core): Model Notes Test Suite
ref: #389 #525
2025-02-09 19:25:36 +09:30
Jon
9b62ba6367 test(settings): Serializer Checks for External Links Notes
ref: #525 #545
2025-02-09 17:58:27 +09:30
Jon
96420f3d23 test(Project_management): Serializer Checks for Project Type Notes
ref: #525 #544
2025-02-09 17:57:59 +09:30
Jon
eb38e70c17 test(Project_management): Serializer Checks for Project State Notes
ref: #525 #543
2025-02-09 17:57:41 +09:30
Jon
dbafbe1a5c test(Project_management): Serializer Checks for Project Notes
ref: #525 #335
2025-02-09 17:57:22 +09:30
Jon
90bee291bd test(Project_management): Serializer Checks for Project Milestone Notes
ref: #525 #542
2025-02-09 17:57:06 +09:30
Jon
5eb120886d test(itim): Serializer Checks for Service Notes
ref: #525 #534
2025-02-09 17:56:31 +09:30
Jon
6e4e63a52e test(itim): Serializer Checks for Port Notes
ref: #525 #536
2025-02-09 17:56:09 +09:30
Jon
8d39fdb9e4 test(itim): Serializer Checks for Cluster Type Notes
ref: #525 #535
2025-02-09 17:55:52 +09:30
Jon
7aa7627faf test(itim): Serializer Checks for Cluster Notes
ref: #525 #533
2025-02-09 17:55:33 +09:30
Jon
29fc7e7e07 test(itam): Serializer Checks for Software Version Notes
ref: #525 #541
2025-02-09 17:55:02 +09:30
Jon
780ab35b26 test(itam): Serializer Checks for Software Notes
ref: #525 #532
2025-02-09 17:54:41 +09:30
Jon
b072ce9fbc test(itam): Serializer Checks for Software Category Notes
ref: #525 #540
2025-02-09 17:54:24 +09:30
Jon
fa757f2edf test(itam): Serializer Checks for Operating System Version Notes
ref: #525 #539
2025-02-09 17:53:43 +09:30
Jon
fccaacbf7c test(itam): Serializer Checks for Operating System Notes
ref: #525 #531
2025-02-09 17:53:27 +09:30
Jon
0f1ff924ed test(itam): Serializer Checks for Device Type Notes
ref: #525 #538
2025-02-09 17:53:02 +09:30
Jon
75598dff94 test(itam): Serializer Checks for Device Notes
ref: #525 #524
2025-02-09 17:52:47 +09:30
Jon
475205f95b test(itam): Serializer Checks for Device Model Notes
ref: #525 #523
2025-02-09 17:52:33 +09:30
Jon
bf74a4c4db test(core): Serializer Checks for Manufacturer Notes
ref: #525 #530
2025-02-09 17:52:07 +09:30
Jon
c15966c694 test(config_management): Serializer Checks for Config Groups Notes
ref: #525 #529
2025-02-09 17:51:18 +09:30
Jon
56ced08c4d test(assistance): Serializer Checks for KB Notes
ref: #525 #528
2025-02-09 17:50:53 +09:30
Jon
c8d6135b83 test(assistance): Serializer Checks for KB Category Notes
ref: #525 #546
2025-02-09 17:50:39 +09:30
Jon
98159c1840 test(access): Serializer Checks for Team Notes
ref: #525 #527
2025-02-09 17:50:03 +09:30
Jon
8140c1f945 test(access): Serializer Checks for Organization Notes
ref: #525 #526
2025-02-09 17:49:51 +09:30
Jon
eff1255419 feat(core): Ensure when editing a model note, the modified user is updated.
ref: #389
2025-02-09 16:47:13 +09:30
Jon
8f2bf3d71e test(core): Test Suite for Model Notes checks
ref: #49 #389 #525
2025-02-09 16:47:02 +09:30
Jon
1a7bade7f3 docs(development): Model Notes Creation
ref: #49 #389 #525
2025-02-09 00:26:55 +09:30
Jon
a7912531e3 test(api): API Fileds user to be super user for tests to run
ref: #525
2025-02-08 23:10:06 +09:30
Jon
32c6991730 test(settings): External Links Notes Function Viewset Tests
ref: #525 #545
2025-02-08 23:08:27 +09:30
Jon
98c02c4101 test(project_management): Project Type Notes Function Viewset Tests
ref: #525 #544
2025-02-08 23:08:01 +09:30
Jon
d8b12aeb7e test(project_management): Project State Notes Function Viewset Tests
ref: #525 #543
2025-02-08 23:07:44 +09:30
Jon
5b02f2c751 test(project_management): Project Notes Function Viewset Tests
ref: #525 #335
2025-02-08 23:07:27 +09:30
Jon
0d4ad05ac9 test(project_management): Project Milestone Notes Function Viewset Tests
ref: #525 #542
2025-02-08 23:07:13 +09:30
Jon
def43c1134 test(itim): Service Notes Function Viewset Tests
ref: #525 #534
2025-02-08 23:06:38 +09:30
Jon
3c08580c10 test(itim): Port Notes Function Viewset Tests
ref: #525 #536
2025-02-08 23:06:19 +09:30
Jon
bc329d2453 test(itim): Cluster Types Notes Function Viewset Tests
ref: #525 #535
2025-02-08 23:05:48 +09:30
Jon
72dfac9d22 test(itim): Cluster Notes Function Viewset Tests
ref: #525 #533
2025-02-08 23:05:27 +09:30
Jon
a74550e1f3 test(itam): Software Version Notes Function Viewset Tests
ref: #525 #541
2025-02-08 22:32:05 +09:30
Jon
382b1d2a30 test(itam): Software Notes Function Viewset Tests
ref: #525 #532
2025-02-08 22:31:48 +09:30
Jon
9c2ef50c3b test(itam): Software Category Notes Function Viewset Tests
ref: #525 #540
2025-02-08 22:31:34 +09:30
Jon
3536a59e5a test(itam): Operating System Version Notes Function Viewset Tests
ref: #525 #539
2025-02-08 22:31:07 +09:30
Jon
0213d45f8a test(itam): Operating System Notes Function Viewset Tests
ref: #525 #531
2025-02-08 22:30:47 +09:30
Jon
41cf9aae41 test(itam): Device Type Notes Function Viewset Tests
ref: #525 #538
2025-02-08 22:30:16 +09:30
Jon
0b25a85e26 test(itam): Device Notes Function Viewset Tests
ref: #525 #524
2025-02-08 22:30:01 +09:30
Jon
4caf26686c test(itam): Device Model Notes Function Viewset Tests
ref: #525 #523
2025-02-08 22:29:49 +09:30
Jon
58c19388c7 test(core): Manufacturer Notes Function Viewset Tests
ref: #525 #530
2025-02-08 22:29:27 +09:30
Jon
6a211677a8 test(config_management): Config Groups Notes Function Viewset Tests
ref: #525 #529
2025-02-08 22:29:07 +09:30
Jon
45d05a183d test(assistance): Knowledge Base Notes Function Viewset Tests
ref: #525 #528
2025-02-08 21:47:06 +09:30
Jon
f144129b4d test(assistance): Knowledge Base Category Notes Function Viewset Tests
ref: #525 #546
2025-02-08 21:46:50 +09:30
Jon
e038d08544 test(access): Team Notes Function Viewset Tests
ref: #525 #527
2025-02-08 21:46:24 +09:30
Jon
05c9e3f066 test(access): Organization Notes Function Viewset Tests
ref: #525 #526
2025-02-08 21:46:10 +09:30
Jon
a1851918e3 fix(core): Permissions require the parent model for model notes
ref: #389 #525
2025-02-08 21:45:09 +09:30
Jon
136f907cd5 docs(access): Add type to parent_model attribute within Organization Mixin
ref: #389 #525
2025-02-08 21:44:08 +09:30
Jon
969aaea884 test(core): Model Notes Test Cases
ref: #389 #525 closes #49
2025-02-08 20:45:41 +09:30
Jon
5a07892b25 test: Remove old notes model tests
ref: #49 #389 #525
2025-02-08 19:52:24 +09:30
Jon
5d17e1a49c test(settings): External Notes Test Cases for ViewSet
ref: #525 #545
2025-02-08 19:31:52 +09:30
Jon
185fb6c332 test(project_management): Project Type Notes Test Cases for ViewSet
ref: #525 #544
2025-02-08 19:30:06 +09:30
Jon
e690012da8 test(project_management): Project State Notes Test Cases for ViewSet
ref: #525 #543
2025-02-08 19:29:29 +09:30
Jon
76b6a57583 test(project_management): Project Notes Test Cases for ViewSet
ref: #525 #335
2025-02-08 19:29:11 +09:30
Jon
7bea5a6156 test(project_management): Project Milestone Notes Test Cases for ViewSet
ref: #525 #542
2025-02-08 19:28:59 +09:30
Jon
45b2f083de test(itim): Service Notes Test Cases for ViewSet
ref: #525 #534
2025-02-08 19:27:52 +09:30
Jon
643894cdfc test(itim): Port Notes Test Cases for ViewSet
ref: #525 #536
2025-02-08 19:27:36 +09:30
Jon
443cbce73b test(itim): Cluster Type Notes Test Cases for ViewSet
ref: #525 #535
2025-02-08 19:27:16 +09:30
Jon
9a5f4e90ff test(itim): Cluster Notes Test Cases for ViewSet
ref: #525 #533
2025-02-08 19:26:55 +09:30
Jon
9c7e572e00 test(itam): Software Version Notes Test Cases for ViewSet
ref: #525 #541
2025-02-08 19:26:34 +09:30
Jon
876a1622dd test(itam): Software Notes Test Cases for ViewSet
ref: #525 #532
2025-02-08 19:25:55 +09:30
Jon
161751f97f test(itam): Software Category Notes Test Cases for ViewSet
ref: #525 #540
2025-02-08 19:25:43 +09:30
Jon
ac0e756c77 test(itam): Operating System Version Notes Test Cases for ViewSet
ref: #525 #539
2025-02-08 19:25:14 +09:30
Jon
115159b8a6 test(itam): Operating_system Notes Test Cases for ViewSet
ref: #525 #531
2025-02-08 19:24:50 +09:30
Jon
10e2550621 test(itam): Device Type Notes Test Cases for ViewSet
ref: #525 #538
2025-02-08 19:24:29 +09:30
Jon
edb6aa6eb7 test(itam): Device Notes Test Cases for ViewSet
ref: #525 #524
2025-02-08 19:23:58 +09:30
Jon
2534557105 test(itam): Device Model Notes Test Cases for ViewSet
ref: #525 #523
2025-02-08 19:23:46 +09:30
Jon
2e6e73353e test(core): Manufacturer Notes Test Cases for ViewSet
ref: #525 #530
2025-02-08 19:23:16 +09:30
Jon
37d6ba202d test(config_management): Config Groups Notes Test Cases for ViewSet
ref: #525 #529
2025-02-08 19:22:55 +09:30
Jon
f3a4123fb6 test(assistance): Knowledge Base Notes Test Cases for ViewSet
ref: #525 #528
2025-02-08 19:22:23 +09:30
Jon
b20abd82e1 test(assistance): Knowledge Base Category Notes Test Cases for ViewSet
ref: #525 #546
2025-02-08 19:22:07 +09:30
Jon
d11e7fa71d test(access): Team Notes Test Cases for ViewSet
ref: #525 #527
2025-02-08 19:21:28 +09:30
Jon
96a8a6a158 test(access): Organization Notes Test Cases for ViewSet
ref: #525 #526
2025-02-08 19:21:15 +09:30
Jon
c0695c8c84 test(project_management): Correct kwargs for Project Milestone Notes Test Cases for API Field Checks
ref: #525 #542
2025-02-08 17:58:44 +09:30
Jon
64c2f1b0d9 test(assistance): Knowledge Base Category Notes Test Cases for API Field Checks
ref: #525 #546
2025-02-08 17:58:33 +09:30
Jon
37a8368a4e feat(assistance): Knowledge Base Category Notes viewset
ref: #525 #546
2025-02-08 17:43:51 +09:30
Jon
ba9c811e16 feat(assistance): Knowledge Base Category Notes Serializer
ref: #525 #546
2025-02-08 17:43:25 +09:30
Jon
ae47b06a72 feat(assistance): Knowledge Base Category Notes Model
ref: #525 #546
2025-02-08 17:43:09 +09:30
Jon
bc8815d607 test(Settings): External Link Notes Test Cases for API Field Checks
ref: #525 #545
2025-02-08 17:33:57 +09:30
Jon
8a06a0dd3a test(project_management): Project Type Notes Test Cases for API Field Checks
ref: #525 #544
2025-02-08 17:33:33 +09:30
Jon
46381fc138 test(project_management): Project State Notes Test Cases for API Field Checks
ref: #525 #543
2025-02-08 17:33:18 +09:30
Jon
be2e0ae837 test(project_management): Project Notes Test Cases for API Field Checks
ref: #335 #525
2025-02-08 17:32:54 +09:30
Jon
cc34e43262 test(project_management): Project Milestone Notes Test Cases for API Field Checks
ref: #525 #542
2025-02-08 17:32:27 +09:30
Jon
a3d0b10a75 test(itim): Service Notes Test Cases for API Field Checks
ref: #525 #534
2025-02-08 17:31:59 +09:30
Jon
eafc364ba5 test(itim): Port Notes Test Cases for API Field Checks
ref: #525 #536
2025-02-08 17:31:44 +09:30
Jon
0304010d0e test(itim): Cluster Types Notes Test Cases for API Field Checks
ref: #525 #535
2025-02-08 17:31:26 +09:30
Jon
5d3eadfd56 test(itim): Cluster Notes Test Cases for API Field Checks
ref: #525 #533
2025-02-08 17:31:09 +09:30
Jon
fe7e9169be test(itam): Software Version Notes Test Cases for API Field Checks
ref: #525 #541
2025-02-08 17:30:43 +09:30
Jon
9d109d2f9a test(itam): Software Notes Test Cases for API Field Checks
ref: #525 #532
2025-02-08 17:30:27 +09:30
Jon
f9b0b694f9 test(itam): Software Category Notes Test Cases for API Field Checks
ref: #525 #540
2025-02-08 17:28:57 +09:30
Jon
d19e742cc5 test(itam): Device Type Notes Test Cases for API Field Checks
ref: #525 #538
2025-02-08 17:27:13 +09:30
Jon
a077506eb0 test(itam): Device Notes Test Cases for API Field Checks
ref: #524 #525
2025-02-08 17:26:49 +09:30
Jon
585f1c01e8 test(itam): Device Model Notes Test Cases for API Field Checks
ref: #523 #525
2025-02-08 17:26:35 +09:30
Jon
f84759720c test(itam): Operating System Test Cases for API Field Checks
ref: #525 #531
2025-02-08 17:26:08 +09:30
Jon
91c5216120 test(itam): Operating System Version Test Cases for API Field Checks
ref: #525 #539
2025-02-08 17:25:47 +09:30
Jon
98868aab32 test(core): Manufacturer Test Cases for API Field Checks
ref: #525 #530
2025-02-08 17:25:00 +09:30
Jon
0a8c3cfffb test(config_management): Config Group Test Cases for API Field Checks
ref: #525 #529
2025-02-08 17:24:34 +09:30
Jon
bff5ea3fe8 test(assistance): KB Test Cases for API Field Checks
ref: #525 #528
2025-02-08 17:24:07 +09:30
Jon
e7729afc98 test(access): Team Test Cases for API Field Checks
ref: #525 #527
2025-02-08 17:23:14 +09:30
Jon
7358b0a90c test(access): Organization Test Cases for API Field Checks
ref: #525 #526
2025-02-08 17:22:59 +09:30
Jon
e67ede0e74 test(core): Model Notes Base Test Cases for API Field Checks
ref: #389 #525
2025-02-08 00:05:18 +09:30
Jon
1e914d1345 feat(project_management): Project Type Notes ViewSet
ref: #525 #544
2025-02-07 23:09:06 +09:30
Jon
ba7c0cd117 feat(project_management): Project Type Notes Serializer
ref: #525 #544
2025-02-07 23:08:34 +09:30
Jon
029e5a6d08 feat(project_management): Project Type Notes Model
ref: #525 #544
2025-02-07 23:08:17 +09:30
Jon
f71fe3d6d7 feat(project_management): Project State Notes ViewSet
ref: #525 #543
2025-02-07 23:00:34 +09:30
Jon
c97cdf276f feat(project_management): Project State Notes Serializer
ref: #525 #543
2025-02-07 22:59:56 +09:30
Jon
c2f7e25579 feat(project_management): Project State Notes Model
ref: #525 #543
2025-02-07 22:59:38 +09:30
Jon
9e7f731a0e feat(project_management): Project Milestone Notes ViewSet
ref: #525 #542
2025-02-07 22:52:59 +09:30
Jon
1f366ab8fd feat(project_management): Project Milestone Notes Serializer
ref: #525 #542
2025-02-07 22:52:20 +09:30
Jon
e59e808b7f feat(project_management): Project Milestone Notes Model
ref: #525 #542
2025-02-07 22:52:01 +09:30
Jon
39f48aadb1 feat(itam): Software Version Notes ViewSet
ref: #525 #541
2025-02-07 22:41:32 +09:30
Jon
e121741a6c feat(itam): Software Version Notes Serializer
ref: #525 #541
2025-02-07 22:40:57 +09:30
Jon
0145ee9349 feat(itam): Software Version Notes Model
ref: #525 #541
2025-02-07 22:40:41 +09:30
Jon
7a0be93752 feat(itam): Software Category Notes ViewSet
ref: #525 #540
2025-02-07 22:32:14 +09:30
Jon
89eecad448 feat(itam): Software Category Notes Serializer
ref: #525 #540
2025-02-07 22:31:45 +09:30
Jon
a5cbf108cb feat(itam): Software Category Notes Model
ref: #525 #540
2025-02-07 22:31:29 +09:30
Jon
67e892dbaa feat(itam): Operating System Version Notes ViewSet
ref: #525 #539
2025-02-07 22:08:12 +09:30
Jon
8477700125 feat(itam): Operating System Version Notes Serializer
ref: #525 #539
2025-02-07 22:07:39 +09:30
Jon
59603e0455 feat(itam): Operating System Version Notes Model
ref: #525 #539
2025-02-07 22:07:22 +09:30
Jon
0bc3f420f0 test: remove old notes model tests
ref: #389 #526
2025-02-07 21:47:01 +09:30
Jon
960646a68c feat(settings): External Link Notes ViewSet
ref: #526 #545
2025-02-07 21:42:09 +09:30
Jon
d1dbe965f9 feat(settings): External Link Notes Serializer
ref: #526 #545
2025-02-07 21:41:40 +09:30
Jon
9fa6ec46dd feat(settings): External Link Notes Model
ref: #526 #545
2025-02-07 21:41:19 +09:30
Jon
d03afa3017 feat(itam): Device Model Notes ViewSet
ref: #523 #526
2025-02-07 21:32:06 +09:30
Jon
f157545b01 feat(itam): Device Model Notes Serializer
ref: #523 #526
2025-02-07 21:31:24 +09:30
Jon
e18f70a20c feat(itam): Device Model Notes Model
ref: #523 #526
2025-02-07 21:31:09 +09:30
Jon
e8ce851c31 fix(access): field organization requires team related_model for org
ref: #526
2025-02-07 21:23:14 +09:30
Jon
4dd4215fd0 test: Update url_name to match new notes endpoint
ref: #526
2025-02-07 21:17:24 +09:30
Jon
dad843f1d4 test(config_Management): Update url_name to match new notes endpoint
ref: #526 #529
2025-02-07 21:11:43 +09:30
Jon
47b1dd7732 feat(itam): Device Type Notes ViewSet
ref: #526 #538
2025-02-07 21:08:55 +09:30
Jon
a599cc9f9c feat(itam): Device Type Notes Serializer
ref: #526 #538
2025-02-07 21:08:19 +09:30
Jon
893066942d feat(itam): Device Type Notes Model
ref: #526 #538
2025-02-07 21:08:05 +09:30
Jon
858538e3eb feat(core): Create an action comment on a ticket when the category changes
ref: #526 #537
2025-02-07 20:50:45 +09:30
Jon
b42a5a9abb feat(itim): Porte Notes ViewSet
ref: #526 #536
2025-02-07 20:35:27 +09:30
Jon
9ea8422007 feat(itim): Porte Notes Serializer
ref: #526 #536
2025-02-07 20:35:01 +09:30
Jon
39fdc9ef1d feat(itim): Porte Notes Model
ref: #526 #536
2025-02-07 20:34:48 +09:30
Jon
a161677f79 feat(itim): Cluster Type Notes ViewSet
ref: #526 #535
2025-02-07 20:28:56 +09:30
Jon
013c31272b feat(itim): Cluster Type Notes Serializer
ref: #526 #535
2025-02-07 20:28:17 +09:30
Jon
911a086963 feat(itim): Cluster Type Notes Model
ref: #526 #535
2025-02-07 20:28:06 +09:30
Jon
c1a47045e7 feat(project_management): Project Notes ViewSet
ref: #335 #526
2025-02-07 20:21:16 +09:30
Jon
644188f952 feat(project_management): Project Notes Serializer
ref: #335 #526
2025-02-07 20:20:46 +09:30
Jon
717bc5750b feat(project_management): Project Notes Model
ref: #335 #526
2025-02-07 20:20:30 +09:30
Jon
3ca1aa3756 feat(itim): Service Notes ViewSet
ref: #526 #534
2025-02-07 20:12:26 +09:30
Jon
afd20ac4e3 feat(itim): Service Notes Serializer
ref: #526 #534
2025-02-07 20:12:01 +09:30
Jon
79c96ff2b5 feat(itim): Service Notes Model
ref: #526 #534
2025-02-07 20:11:48 +09:30
Jon
b135b0690e feat(itim): Cluster Notes ViewSet
ref: #526 #533
2025-02-07 19:59:56 +09:30
Jon
041b837068 feat(itim): Cluster Notes Serializer
ref: #526 #533
2025-02-07 19:59:19 +09:30
Jon
ea8a56322f feat(itim): Cluster Notes Model
ref: #526 #533
2025-02-07 19:59:05 +09:30
Jon
0b418b6f2c feat(itam): Software Notes ViewSet
ref: #526 #532
2025-02-07 19:47:35 +09:30
Jon
a2abfc83ee feat(itam): Software Notes Serilaizer
ref: #526 #532
2025-02-07 19:46:54 +09:30
Jon
03ce6824ee feat(itam): Software Notes Model
ref: #526 #532
2025-02-07 19:46:39 +09:30
Jon
c12f9925ae feat(itam): Operating System Notes ViewSet
ref: #526 #531
2025-02-07 19:36:56 +09:30
Jon
3efa835295 feat(itam): Operating System Notes Serializer
ref: #526 #531
2025-02-07 19:36:10 +09:30
Jon
d8fdb17112 feat(itam): Operating System Notes Model
ref: #526 #531
2025-02-07 19:36:00 +09:30
Jon
5842e81455 feat(core): Manufacturer Notes viewset
ref: #526 #530
2025-02-07 19:18:16 +09:30
Jon
f057693a61 feat(core): Manufacturer Notes serializer
ref: #526 #530
2025-02-07 19:17:53 +09:30
Jon
c77d33e910 feat(core): Manufacturer Notes Model
ref: #526 #530
2025-02-07 19:17:37 +09:30
Jon
ecb7116f4a feat(config_management): Config Group Notes ViewSet
ref: #526 #529
2025-02-07 19:06:34 +09:30
Jon
3464fcf93b feat(config_management): Config Group Notes Serializer
ref: #526 #529
2025-02-07 19:06:11 +09:30
Jon
c8f0c54549 feat(config_management): Config Group Notes Model
ref: #526 #529
2025-02-07 19:05:57 +09:30
Jon
4367878396 feat(assistance): Knowledge Base Notes ViewSet
ref: #526 #528
2025-02-07 18:49:56 +09:30
Jon
c950daa011 feat(assistance): Knowledge Base Notes Serializer
ref: #526 #528
2025-02-07 18:49:34 +09:30
Jon
725b009ee6 feat(assistance): Knowledge Base Notes Model
ref: #526 #528
2025-02-07 18:49:22 +09:30
Jon
9fcb793bb2 feat(access): Team Notes ViewSet
ref: #526 #527
2025-02-07 18:35:38 +09:30
Jon
bd574ce952 feat(access): Team Notes Serializer
ref: #526 #527
2025-02-07 18:35:10 +09:30
Jon
77f0554893 feat(access): Team Notes Model
ref: #526 #527
2025-02-07 18:34:37 +09:30
Jon
e07af389ba feat(access): Organization Notes ViewSet
ref: #525 #526
2025-02-07 18:17:05 +09:30
Jon
3060fd0b86 feat(access): Organization Notes Serializer
ref: #525 #526
2025-02-07 18:16:27 +09:30
Jon
3184e5fb07 feat(access): Organization Notes Model
ref: #525 #526
2025-02-07 18:16:17 +09:30
Jon
02140ce731 feat(itam): Device Notes ViewSet
ref: #524 #525
2025-02-07 18:12:50 +09:30
Jon
dd06d9e1ff feat(itam): Device Notes Serializer
ref: #524 #525
2025-02-07 18:12:21 +09:30
Jon
ca4e9add88 feat(itam): Device Notes Model
ref: #524 #525
2025-02-07 18:12:09 +09:30
Jon
657bbfb25a test(core): Remove notes test cases for previous notes model
ref: #389 #525
2025-02-07 18:11:10 +09:30
Jon
64e344206c refactor(access): Dont add releationship from tenancyObject.organization to organization model
ref: #389 #525
2025-02-07 18:10:44 +09:30
Jon
a132baa838 feat(core): Base viewset for model notes
ref: #389 #525
2025-02-07 18:08:42 +09:30
Jon
f833b93074 feat(core): Base serializer for model notes
ref: #389 #525
2025-02-07 18:06:49 +09:30
Jon
06991853ff fix(core): Use generic APIError for ticket save when no action comment will be created
ref: #525
2025-02-07 16:32:37 +09:30
Jon
cff343989b feat(core): Base model for model notes
ref: #389 #525
2025-02-07 15:49:12 +09:30
Jon
ff8d422308 feat(core): Add failsafe to throw an exception if no action comment will be created
ref: #522 closes #492
2025-02-06 23:08:11 +09:30
Jon
aded110307 feat(core): Add field parent_ticket to base ticket view serializer
ref: #517 #522
2025-02-06 22:50:06 +09:30
Jon
fbc6a3c338 feat(project_management): Add field parent_ticket to project task ticket view serializer
ref: #517 #522
2025-02-06 22:49:42 +09:30
Jon
7629c6cf9b feat(itim): Add field parent_ticket to problem ticket view serializer
ref: #517 #522
2025-02-06 22:49:24 +09:30
Jon
96b2eec050 feat(itim): Add field parent_ticket to incident ticket view serializer
ref: #517 #522
2025-02-06 22:49:15 +09:30
Jon
30394644bf feat(itim): Add field parent_ticket to change ticket view serializer
ref: #517 #522
2025-02-06 22:49:02 +09:30
Jon
610df69e21 feat(assistance): Add field parent_ticket to request ticket view serializer
ref: #517 #522
2025-02-06 22:48:46 +09:30
Jon
0b0b527b55 feat(core): Add field parent to ticket model
ref: #517 #522
2025-02-06 22:40:20 +09:30
724e7e6fb0 build: bump version 1.8.0 -> 1.9.0 2025-02-06 12:29:10 +00:00
Jon
30160fb033 Merge pull request #485 from nofusscomputing/feature-next-release 2025-02-06 21:49:54 +09:30
Jon
317a66b714 Merge pull request #518 from nofusscomputing/viewset-caching-of-objects 2025-02-06 21:38:41 +09:30
Jon
aa9c0c7552 test(core): Add missing unit tests for notes ticket viewset
ref: #518 closes #512 closes #513
2025-02-06 21:24:23 +09:30
Jon
22f46160be fix(project_management): Add missing attribute view_description to project tasks viewset
ref: #518
2025-02-06 21:10:59 +09:30
Jon
745e1f6a66 fix(settings): Add missing attribute view_description to user settings viewset
ref: #518
2025-02-06 21:09:44 +09:30
Jon
d8fae15995 fix(settings): Add missing attribute view_description to app settings viewset
ref: #518
2025-02-06 21:09:35 +09:30
Jon
5d8332015b test(settings): Add missing unit tests for user settings ticket viewset
ref: #512 #513 #518
2025-02-06 21:08:59 +09:30
Jon
91e83b0ad9 test(settings): Add missing unit tests for app settings ticket viewset
ref: #512 #513 #518
2025-02-06 21:08:52 +09:30
Jon
f29a8ebc23 fix(itim): Add missing attribuite to problem ticket viewset
ref: #518
2025-02-06 21:01:47 +09:30
Jon
68a2ca73cc fix(itim): Add missing attribuite to incident ticket viewset
ref: #518
2025-02-06 21:01:38 +09:30
Jon
121ee7b861 fix(itim): Add missing attribuite to change ticket viewset
ref: #518
2025-02-06 21:01:30 +09:30
Jon
af0b05cdd5 chore(itim): correct var name within function get_serializer_class
ref: #512 #513 #518
2025-02-06 20:59:21 +09:30
Jon
73c3f0ac34 test(project_management): Add missing unit tests for project task ticket viewset
ref: #512 #513 #518
2025-02-06 20:50:56 +09:30
Jon
0db2c09be4 test(api): Add kwargs as arg to test cases
ref: #512 #513 #518
2025-02-06 20:47:58 +09:30
Jon
21a85555a7 fix(itimm): correct truthy check for service device ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 20:45:56 +09:30
Jon
cf35677464 fix(itam): correct truthy check for service cluster ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 20:45:37 +09:30
Jon
c508cfc8a0 fix(itam): correct truthy check for service cluster ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 20:45:26 +09:30
Jon
2e321d22bc fix(itam): correct truthy check for service device ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 20:45:13 +09:30
Jon
16199cbd30 test(itim): Add missing unit tests for problem ticket viewset
ref: #512 #513 #518
2025-02-06 20:44:27 +09:30
Jon
29443a51fc test(itim): Add missing unit tests for incident ticket viewset
ref: #512 #513 #518
2025-02-06 20:44:20 +09:30
Jon
bac22d6a9d test(itim): Add missing unit tests for change ticket viewset
ref: #512 #513 #518
2025-02-06 20:44:12 +09:30
Jon
f86038c169 test(core): add permisssion class override test case for celery results
ref: #518
2025-02-06 20:36:56 +09:30
Jon
38314ac977 fix(itam): add missing attribute view_name to celery log viewset
ref: #518
2025-02-06 20:36:17 +09:30
Jon
83fb6d005b test: Add empty kwargs to ViewSet index page test cases
ref: #512 #513 #518
2025-02-06 20:35:46 +09:30
Jon
c755feb9a7 fix(api): correct get_view_name to prioritize view_name over model.verbose_name
ref: #512 #513 #518
2025-02-06 20:34:46 +09:30
Jon
6f0a67a957 fix(itam): correct truthy check for software version ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 20:08:04 +09:30
Jon
66b6ba9ae9 fix(itam): correct truthy check for os version ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 20:07:51 +09:30
Jon
f1e1e76266 fix(itam): correct truthy check for device software ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 20:07:35 +09:30
Jon
22fcd42689 fix(itam): correct truthy check for device os ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 20:07:24 +09:30
Jon
efc95ef736 fix(itam): correct truthy check for software version ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 20:07:00 +09:30
Jon
184f775af4 fix(itam): correct truthy check for software category ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 20:06:39 +09:30
Jon
4eec08ffda fix(itam): correct truthy check for os version ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 20:06:15 +09:30
Jon
9c2b0cbe66 fix(itam): correct truthy check for device software ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 20:05:58 +09:30
Jon
84499bf5d1 fix(itam): correct truthy check for device os ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 20:05:44 +09:30
Jon
0338e5c8de test(itam): Add missing unit tests for software version viewset
ref: #512 #513 #518
2025-02-06 20:05:04 +09:30
Jon
b9c4228edc test(itam): Add missing unit tests for software categories viewset
ref: #512 #513 #518
2025-02-06 20:04:17 +09:30
Jon
c907efbadb test(itam): Add missing unit tests for os versions viewset
ref: #512 #513 #518
2025-02-06 20:04:02 +09:30
Jon
c54c54d821 test(itam): Add missing unit tests for software installs viewset
ref: #512 #513 #518
2025-02-06 20:03:49 +09:30
Jon
d608a3d138 test(itam): Add missing unit tests for os installs viewset
ref: #512 #513 #518
2025-02-06 20:03:38 +09:30
Jon
18ddd92509 test(itam): Add missing unit tests for device software viewset
ref: #512 #513 #518
2025-02-06 20:03:26 +09:30
Jon
02afaf29ff test(itam): Add missing unit tests for device operating system viewset
ref: #512 #513 #518
2025-02-06 20:03:02 +09:30
Jon
bb99b89a38 test(api): Add kwargs as arg to test cases
ref: #512 #513 #518
2025-02-06 19:40:51 +09:30
Jon
b988fe3084 fix(core): correct varname for queryset within notes queryset
ref: #518
2025-02-06 19:35:29 +09:30
Jon
697ebbb96b fix(core): add missing attribute view_description to ticket linked item viewset
ref: #518
2025-02-06 19:21:39 +09:30
Jon
241f18a055 fix(core): add missing attribute view_description to ticket comment viewset
ref: #518
2025-02-06 19:21:29 +09:30
Jon
a32713f6b7 fix(core): add missing attribute view_description to note viewset
ref: #518
2025-02-06 19:21:18 +09:30
Jon
f910503f3c fix(core): add missing attribute view_description to related ticket log viewset
ref: #518
2025-02-06 19:21:03 +09:30
Jon
9cb142fa4b fix(core): add missing attribute view_description to celery log viewset
ref: #518
2025-02-06 19:20:53 +09:30
Jon
991d30e1fd fix(core): add missing attribute view_description to history viewset
ref: #518
2025-02-06 19:20:44 +09:30
Jon
504437f8cc fix(core): correct truthy check for notes ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 19:20:15 +09:30
Jon
33fa7fd61c fix(core): correct truthy check for history ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 19:19:18 +09:30
Jon
16a827c73b fix(core): correct truthy check for notes ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 19:19:05 +09:30
Jon
805835721e fix(core): correct truthy check for related ticket ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 19:18:47 +09:30
Jon
82bd63b80d fix(core): correct truthy check for ticket comment ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 19:18:32 +09:30
Jon
caa6a6df99 fix(core): correct truthy check for ticket linked items ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 19:18:09 +09:30
Jon
34f7dd834d fix(core): correct truthy check for ticket linked items ViewSet property when evaluating queryset
ref: #513 #518
2025-02-06 19:17:27 +09:30
Jon
3e6206aaad fix(core): correct truthy check for ticket comment ViewSet property when evaluating queryset
ref: #513 #518
2025-02-06 19:17:02 +09:30
Jon
6e789e6966 fix(core): correct truthy check for related ticket ViewSet property when evaluating queryset
ref: #513 #518
2025-02-06 19:16:38 +09:30
Jon
d1364c6696 fix(core): correct truthy check for history ViewSet property when evaluating queryset
ref: #513 #518
2025-02-06 19:16:22 +09:30
Jon
1e71d0d39b fix(core): correct truthy check for celery log ViewSet property when evaluating queryset
ref: #513 #518
2025-02-06 19:16:06 +09:30
Jon
b8b534e499 test(core): Add missing unit tests for ticket linked items viewset
ref: #512 #513 #518
2025-02-06 19:15:29 +09:30
Jon
245962668f test(core): Add missing unit tests for ticket comment viewset
ref: #512 #513 #518
2025-02-06 19:15:18 +09:30
Jon
d5dd58f78e test(core): Add missing unit tests for celery log viewset
ref: #512 #513 #518
2025-02-06 19:14:30 +09:30
Jon
fcb212e66e test(core): Add missing unit tests for history viewset
ref: #512 #513 #518
2025-02-06 19:14:18 +09:30
Jon
038a3404d7 test(core): Add missing unit tests for related tickets viewset
ref: #512 #513 #518
2025-02-06 19:14:07 +09:30
Jon
b6e0a90848 fix(core): correct truthy check for Ticket Base ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 18:20:19 +09:30
Jon
29dd03557c fix(core): correct truthy check for ticket base ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 18:19:35 +09:30
Jon
fe73472aa4 fix(assistance): Add missing attribute view_description to request ticket ViewSet
ref: #518
2025-02-06 18:18:49 +09:30
Jon
6bab430466 test(assistance): Add missing unit tests for request ticket viewset
ref: #512 #513 #518
2025-02-06 18:18:26 +09:30
Jon
776449ba10 test(api): queryset and serializer_class test cases updated to use Fake request object
some viewsets require the request object for permission checking.

ref: #512 #513 #518
2025-02-06 18:10:54 +09:30
Jon
9ba2fd6779 fix(settinggs): Add missing attribute view_description to external links ViewSet
ref: #518
2025-02-06 17:43:52 +09:30
Jon
02595ca010 fix(core): Add missing attribute view_description to ticket comment category ViewSet
ref: #518
2025-02-06 17:36:48 +09:30
Jon
59c541486d fix(core): Add missing attribute view_description to ticekt category ViewSet
ref: #518
2025-02-06 17:36:35 +09:30
Jon
9b1d3384cd fix(core): Add missing attribute view_description to Manufacturer ViewSet
ref: #518
2025-02-06 17:36:12 +09:30
Jon
fe27218256 fix(project_management): correct truthy check for project milestone ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 17:29:50 +09:30
Jon
64c9ed7978 fix(settings): correct truthy check for user settings ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:26:30 +09:30
Jon
919bfd9d98 fix(settings): correct truthy check for external links ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:26:19 +09:30
Jon
1ba41d94fb fix(settings): correct truthy check for app settings ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:26:07 +09:30
Jon
0ed80217f2 test(settings): Add missing unit tests for external links viewset
ref: #512 #513 #518
2025-02-06 17:24:03 +09:30
Jon
346fc57ba7 fix(project_management): correct truthy check for project milestone ViewSet property when evaluating queryset
ref: #512 #518
2025-02-06 17:15:59 +09:30
Jon
ba443c4e64 fix(project_management): correct truthy check for project ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:15:34 +09:30
Jon
c753b799ee fix(project_management): correct truthy check for project type ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:15:26 +09:30
Jon
70baac6fb2 fix(project_management): correct truthy check for project state ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:15:14 +09:30
Jon
1ea5937881 fix(project_management): correct truthy check for project milestone ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:15:04 +09:30
Jon
33726b9114 test(project_management): Add missing unit tests for project type viewset
ref: #512 #513 #518
2025-02-06 17:14:32 +09:30
Jon
a89d13c2b1 test(project_management): Add missing unit tests for project state viewset
ref: #512 #513 #518
2025-02-06 17:14:05 +09:30
Jon
0d32fd3528 test(project_management): Add missing unit tests for project milestone viewset
ref: #512 #513 #518
2025-02-06 17:13:43 +09:30
Jon
3dce2dad05 test(project_management): Add missing unit tests for project viewset
ref: #512 #513 #518
2025-02-06 17:13:32 +09:30
Jon
e17164d336 fix(itam): correct truthy check for service ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:01:15 +09:30
Jon
c36e9a5293 fix(itam): correct truthy check for port ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:01:05 +09:30
Jon
dcf8136191 fix(itam): correct truthy check for cluster ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:00:55 +09:30
Jon
10e63b3135 fix(itam): correct truthy check for cluster type ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-06 17:00:49 +09:30
Jon
2baee0e4d0 test(itim): Add missing unit tests for service viewset
ref: #512 #513 #518
2025-02-06 17:00:29 +09:30
Jon
ae94285dc7 test(itim): Add missing unit tests for ports viewset
ref: #512 #513 #518
2025-02-06 17:00:13 +09:30
Jon
c3a0c563a6 test(itim): Add missing unit tests for cluster types viewset
ref: #512 #513 #518
2025-02-06 16:59:53 +09:30
Jon
d0590b8515 test(itim): Add missing unit tests for cluster viewset
ref: #512 #513 #518
2025-02-06 16:59:42 +09:30
Jon
f0c9c0cdc6 fix(itam): correct truthy check for software ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:02:23 +09:30
Jon
b57d68082b fix(itam): correct truthy check for os ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:02:13 +09:30
Jon
af494acd7f fix(itam): correct truthy check for device ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:02:05 +09:30
Jon
e205b0a7a6 fix(itam): correct truthy check for device type ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:01:59 +09:30
Jon
c7fc8055f6 fix(itam): correct truthy check for device model ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:01:49 +09:30
Jon
76cc4e1e8a fix(core): correct truthy check for ticket comment category ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:01:34 +09:30
Jon
4bbff26bd2 fix(core): correct truthy check for ticket category ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:01:23 +09:30
Jon
2f9b65a326 fix(core): correct truthy check for manufacturer ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:01:12 +09:30
Jon
27b7550114 fix(config_management): correct truthy check for config group ViewSet property when evaluating queryset
ref: #512 #518
2025-02-04 08:00:47 +09:30
Jon
06cefb9223 fix(config_management): correct truthy check for config group ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:00:36 +09:30
Jon
67a5e63b33 fix(config_management): correct truthy check for config group software ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 08:00:21 +09:30
Jon
4dae20b056 fix(config_management): correct truthy check for config group software ViewSet property when evaluating queryset
ref: #512 #518
2025-02-04 08:00:04 +09:30
Jon
4adb38fdd2 fix(assistance): correct truthy check for model kb article ViewSet property when evaluating queryset
ref: #512 #518
2025-02-04 07:59:32 +09:30
Jon
ab7c840c60 fix(assistance): correct truthy check for model kb article ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 07:59:19 +09:30
Jon
997d2df4b7 fix(assistance): correct truthy check for kb ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 07:58:58 +09:30
Jon
4160d974f5 fix(assistance): correct truthy check for kb ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 07:58:50 +09:30
Jon
baf7d0226e fix(access): correct truthy check for team ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 07:58:32 +09:30
Jon
36992f8469 fix(access): correct truthy check for team ViewSet property when evaluating queryset
ref: #512 #518
2025-02-04 07:58:13 +09:30
Jon
325509aa16 fix(access): correct truthy check for team user ViewSet property when evaluating queryset
ref: #512 #518
2025-02-04 07:58:01 +09:30
Jon
57cc0d2caa fix(access): correct truthy check for team user ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 07:57:44 +09:30
Jon
4833245e34 fix(access): correct truthy check for organization ViewSet property when evaluating serializer_class
ref: #513 #518
2025-02-04 07:57:27 +09:30
Jon
d57dfb809b test(itam): Add missing unit tests for Software viewset
ref: #512 #513 #518
2025-02-04 07:45:07 +09:30
Jon
98d47c69d2 test(itam): Add missing unit tests for Operating System viewset
ref: #512 #513 #518
2025-02-04 07:45:07 +09:30
Jon
ded0cc925c test(itam): Add missing unit tests for Device Type viewset
ref: #512 #513 #518
2025-02-04 07:45:07 +09:30
Jon
857bcc6652 test(itam): Add missing unit tests for Device Model viewset
ref: #512 #513 #518
2025-02-04 07:45:07 +09:30
Jon
f3be33431c test(itam): Add missing unit tests for Device viewset
ref: #512 #513 #518
2025-02-04 07:45:07 +09:30
Jon
8bd3a8fb45 fix(api): correct truthy check for set property when evaluating serializer_class
ref: #513 #518 closes #519
2025-02-04 07:45:07 +09:30
Jon
67db68c5ea fix(api): correct truthy check for set property when evaluating queryset
ref: #512 #518 closes #519
2025-02-04 07:45:07 +09:30
Jon
3baae2a6cd test(api): dont mock the qs bool
this was mocked as the class var was returning false when the var was set. appears python uses the variables object for a truthy check

ref: #512 #513 #518
2025-02-04 07:34:55 +09:30
Jon
4d3a8e768b test(core): Add missing unit tests for Ticket Comment Category viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
169b8dbf4d test(core): Add missing unit tests for Ticket Category viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
8d7d5a127f test(core): Add missing unit tests for manufacturer viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
ad4d030a40 fix(api): correct variable name in common viewset for queryset
ref: #512 #518
2025-02-04 07:29:11 +09:30
Jon
ce0cc856a7 fix(config_management): config group software viewset must cache queryset
ref: #512 #518
2025-02-04 07:29:11 +09:30
Jon
fae11ca310 fix(config_management): config group viewset must cache queryset
ref: #512 #518
2025-02-04 07:29:11 +09:30
Jon
95af0d3848 test(config_management): Add missing unit tests for config groups software viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
596c708212 test(config_management): Add missing unit tests for config groups viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
2f9b6c6027 fix(assistance): Knowledge base category viewset must cache serializer_class
ref: #513 #518
2025-02-04 07:29:11 +09:30
Jon
84ac2d3562 test(assistance): Add missing unit tests for Model Knowledge Base Article viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
f9837e0ec4 test(assistance): Add missing unit tests for Knowledge Base Category viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
73a63f5af4 test(assistance): Add missing unit tests for Knowledge Base viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
5066cf7536 fix(access): Team viewset must cache serializer_class
ref: #513 #518
2025-02-04 07:29:11 +09:30
Jon
6522d274a3 fix(access): Team viewset must cach queryset
ref: #512 #518
2025-02-04 07:29:11 +09:30
Jon
759e774928 fix(access): Team User viewset must cach queryset
ref: #512 #518
2025-02-04 07:29:11 +09:30
Jon
56aab474e9 test(access): Add missing unit tests for team user viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
1bd1d546fc test(access): Add missing unit tests for team viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
fe3688791f test(access): Add missing unit tests for organization viewset
ref: #512 #513 #518
2025-02-04 07:29:11 +09:30
Jon
a00db4e7f6 fix(api): Add missing property bacjk_url to Common viewset
ref: #518
2025-02-04 07:29:11 +09:30
Jon
f80ed4d366 fix(api): Common viewset to cache and use queryset Object
ref: #512 #518
2025-02-04 07:29:11 +09:30
Jon
cd47e643d5 test(base): Ensure viewsets are caching and using the serializer_class object
ref: #513 #518
2025-02-04 07:29:10 +09:30
Jon
db12750dc0 test(base): Ensure viewsets are caching and using the queryset object
ref: #512 #518
2025-02-04 07:29:10 +09:30
Jon
59a9a1ca75 Merge pull request #514 from nofusscomputing/ensure-user-always-added-to-ticket-comment 2025-02-01 20:24:45 +09:30
Jon
942104ebed test(core): Test case to ensure ticket comment always has user added
ref: #514 fixes #460
2025-02-01 20:10:28 +09:30
Jon
df7b40ba03 feat(core): Validate user field to ensure ticket comments always have user who added comment
ref: #460 #514
2025-02-01 20:10:10 +09:30
Jon
1488c6e96a Merge pull request #511 from nofusscomputing/db-queries-reduction 2025-02-01 18:07:02 +09:30
Jon
b419c03774 fix(access): When conduting permission check for user settings, if user not owner of settings, deny access
ref: #471 #511
2025-02-01 17:56:14 +09:30
Jon
1ad370e7cf test(settings): when checking if user can delete own settings, user must be owner of settings
ref: #471 #511
2025-02-01 17:55:37 +09:30
Jon
b7cdb21136 fix(access): when checking object permissions, dont cast obj to int untill checking it exists
ref: #471 #511
2025-02-01 17:36:29 +09:30
Jon
78afe7c86b test(settings): regardless of permissions a user can change their own settings
ref: #471 #511
2025-02-01 17:26:12 +09:30
Jon
5507c4a366 test(access): during permission check function has_permission ensure get_object not called
ref: #471 #511
2025-02-01 17:20:11 +09:30
Jon
a4788aba75 fix(access): org mixin get_obj_org not to call get_object
ref: #471 #511
2025-02-01 16:58:39 +09:30
Jon
b6593c6825 refactor(access): when checking obj permission use view cached obj organization
ref: #471 #511
2025-02-01 16:30:01 +09:30
Jon
f9393a59d2 chore(access): Remove extra calls to get_obj_permission from permission Mixin has_permission
ref: #471 #511
2025-02-01 16:27:26 +09:30
Jon
22b02dc044 refactor(access): When fetching obj org, if pk exist attempt to fetch object
ref: #471 #511
2025-02-01 16:26:02 +09:30
Jon
e5b0ed4c69 feat(core): Cache ticket linked item queryset
ref: #471 #511
2025-02-01 15:28:19 +09:30
Jon
96565aa2c5 fix(core): ensure item_type exists before trying to get queryset
ref: #471 #511
2025-02-01 15:27:47 +09:30
Jon
17a29405c5 refactor(core): When fetching a ticket, fetch related fields
ref: #471 #511
2025-02-01 15:26:40 +09:30
Jon
c5eb26e62b feat: Views to cache discovered serializer
ref: #471 #511
2025-02-01 14:46:05 +09:30
Jon
49088f1f68 Merge pull request #510 from nofusscomputing/test-ticket-description-action-comment 2025-01-31 22:12:16 +09:30
Jon
9140a886f2 test(core): Ensure that an action comment is created when ticket description is edited
ref: #510 closes #502
2025-01-30 18:20:56 +09:30
Jon
894ed14842 Merge pull request #509 from nofusscomputing/ticket-action-comment-description 2025-01-30 14:51:56 +09:30
Jon
d7a8840444 feat(core): When changing ticket description create an action comment with the details
ref: #502
2025-01-28 05:47:07 +09:30
Jon
624f892a73 Merge pull request #508 from nofusscomputing/add-missing-ticket-action-comments 2025-01-27 20:59:10 +09:30
Jon
26e475a42f test(core): Ticket Action comment test cases for real_finish_date actions
ref: #508 closes #501
2025-01-27 20:04:16 +09:30
Jon
de2722f6ca test(core): Ticket Action comment test cases for real_start_date actions
ref: #508 closes #499
2025-01-27 20:03:25 +09:30
Jon
32913895c9 test(core): Ticket Action comment test cases for planned_finish_date actions
ref: #508 closes #500
2025-01-27 20:02:37 +09:30
Jon
744d9a2ec4 test(core): Ticket Action comment test cases for planned_start_date actions
ref: #508 closes #498
2025-01-27 20:02:02 +09:30
Jon
98bc0fc1d7 fix(core): Ticket Action comment date fields must be checked if empty before use
ref: #492 #508
2025-01-27 20:01:31 +09:30
Jon
f7543ced8d test(core): Ticket Action comment test cases for milestone actions
ref: #508 closes #497
2025-01-27 19:27:18 +09:30
Jon
7190354d6a test(core): Ticket Action comment test cases for project actions
ref: #395 #508
2025-01-27 19:15:10 +09:30
Jon
467fc18bd1 test(core): Ticket Action comment tests moved to their own suite
ref: #497 #508
2025-01-27 18:59:22 +09:30
Jon
7572763129 refactor(core): Ticket action comment for changing milestone to use item tasg
ref: #497 #508
2025-01-27 17:58:02 +09:30
Jon
76e7d64341 refactor(core): Ticket action comment for changing project to use item tasg
ref: #492 #508
2025-01-27 17:57:01 +09:30
Jon
120380a95c docs(roadmap): update
ref: #508
2025-01-27 17:18:39 +09:30
Jon
4c5c460d88 feat(core): When changing a ticket real finish date create an action comment with the details
ref: #501 #508
2025-01-27 17:18:39 +09:30
Jon
2865c3d32a feat(core): When changing a ticket real start date create an action comment with the details
ref: #499 #508
2025-01-27 17:18:38 +09:30
Jon
efd205c244 feat(core): When changing a ticket planned finish date create an action comment with the details
ref: #500 #508
2025-01-27 17:18:38 +09:30
Jon
c91857850b feat(core): When changing a ticket planned start date create an action comment with the details
ref: #498 #508
2025-01-27 17:13:04 +09:30
Jon
a58cb1ee95 feat(core): When changing a ticket milestone create an action comment with the changed details
ref: #497 #508
2025-01-27 17:12:35 +09:30
Jon
995a102da1 Merge pull request #491 from nofusscomputing/ticket-badges 2025-01-24 17:50:52 +09:30
Jon
40a15ed4f0 test(core): Unit test cases for ticket urgency_badge field checks
ref: #491 closes #487
2025-01-24 17:26:35 +09:30
Jon
52e852c647 test(core): Unit test cases for ticket priority_badge field checks
ref: #491 closes #489
2025-01-24 17:26:35 +09:30
Jon
9a35d023d9 test(core): Unit test cases for ticket impact_badge field checks
ref: #491 closes #488
2025-01-24 17:26:34 +09:30
Jon
cbecdae5d1 feat(core): Add Priority badge field to ALL ticket types
ref: #489 #491
2025-01-24 17:06:56 +09:30
Jon
bcc71ee866 feat(core): Add Impact badge field to ALL ticket types
ref: #488 #491
2025-01-24 17:06:34 +09:30
Jon
824244f217 feat(core): Add urgency badge field to ALL ticket types
ref: #487 #491
2025-01-24 17:03:15 +09:30
Jon
06e0943e30 test(settings): Remove no-permission failure test as user settings require no permissions
ref: #485 fixes #486
2025-01-24 15:46:01 +09:30
Jon
b8cac94f9a fix(settings): grant the user access to their own settings object
ref: #485 #486
2025-01-24 15:17:07 +09:30
Jon
a1207bfb0f fix(settings): grant the user access to their own settings
ref: #485 #486
2025-01-23 22:47:55 +09:30
Jon
b0127584d6 docs: correct doc linting errors so they build
ref: #485  fixes #484
2025-01-23 19:04:38 +09:30
803e063da0 build: bump version 1.7.0 -> 1.8.0 2025-01-23 08:27:44 +00:00
Jon
2feee03d61 Merge pull request #467 from nofusscomputing/feature-next-release 2025-01-23 17:44:26 +09:30
Jon
6739672e6e Merge pull request #475 from nofusscomputing/465-further-work 2025-01-23 17:33:29 +09:30
Jon
c69fc263b3 feat(python): update django 5.1.4 -> 5.1.5
ref: #475
2025-01-23 17:23:36 +09:30
Jon
03edd78dbc fix(core): triage user requires access to date fields for change, incident, problem and project task tickets
ref: #475
2025-01-23 17:11:32 +09:30
Jon
a2fdb0351a test(core): Correct ticket tests as triage user is supposed to have access to ticket date fields
ref: #475
2025-01-23 16:59:15 +09:30
Jon
f6f957f5e6 fix(core): triage user requires access to date fields for tickets
ref: #475
2025-01-23 16:23:44 +09:30
Jon
5735427e3a fix(core): User must be a required field for ticket comment
ref: #470 #475
2025-01-19 15:42:46 +09:30
Jon
ab0666005c refactor(access): Dont override django middleware, create own for access tenancy
ref: #475
2025-01-19 15:32:48 +09:30
Jon
9b0575cd07 Merge pull request #473 from nofusscomputing/471-refactor-performance 2025-01-19 00:02:03 +09:30
Jon
9b40668a30 fix(access): use request object passed to has_object_permission
ref: #473 #474
2025-01-18 23:43:11 +09:30
Jon
929c95ca80 fix(core): ensure when updating, reques.tenancy object perm checking is used
ref: #473 #474
2025-01-18 23:38:08 +09:30
Jon
995615c0a2 fix(project): when creating a project, fetch the organization object
ref: #473 #474
2025-01-18 23:33:50 +09:30
Jon
8f8c7986e5 fix(api): Only attempt to access a app_settings object for org field if request object exists
ref: #473 #474
2025-01-18 23:32:18 +09:30
Jon
58ec0a83c0 fix(core): When adding a ticket, query for org
ref: #473 #474
2025-01-18 23:04:04 +09:30
Jon
4d53e1846a fix(access): use the request user teams within Manager
ref: #473 #474
2025-01-18 23:03:20 +09:30
Jon
f08d3357d0 test: update to cater for tenancy object in request
ref: #473 #474
2025-01-18 22:57:00 +09:30
Jon
7f79c8485b feat(access): TenancyManager object to cache the users team lokkup
ref: #473
2025-01-18 17:58:33 +09:30
Jon
2d41d8a784 feat(access): if organization object casted to int, return organization.id
ref: #473 #474
2025-01-18 17:58:19 +09:30
Jon
e5d23cc1fa refactor(access): Move user perm logic to request.tenancy object
ref: #473 #474
2025-01-18 17:57:17 +09:30
Jon
6bf40e469c refactor: Move app_settings object to request object
ref: #473
2025-01-18 17:55:54 +09:30
Jon
aa69163337 docs(access): add page_speed test to contributing
ref: #469 #471
2025-01-17 03:16:24 +09:30
Jon
7f16a06131 refactor(access): cache app settings during perm check
ref: #469 #471
2025-01-17 01:57:06 +09:30
Jon
fefde281be fix(access): cached orgs is an int list
ref: #469 #471
2025-01-17 01:51:48 +09:30
Jon
bd07c83cfc refactor(access): prefetch team related fields
ref: #469 #471
2025-01-17 01:50:02 +09:30
Jon
4314ec6247 test: Initial k6s individual page speed test cases
ref: #469 #471
2025-01-17 01:26:54 +09:30
Jon
ccb95c6e22 Merge pull request #469 from nofusscomputing/463-fix-doc-links 2025-01-14 18:29:40 +09:30
Jon
ca1cc4ed7b test(app): metrics_enabled setings checks
ref:#469 fixes #470 closes #156
2025-01-14 17:43:56 +09:30
Jon
ea02798a5e test(app): refactor. order tests alphanumerical
ref: #469 #470
2025-01-14 16:23:21 +09:30
Jon
a5f870b7d0 fix(base): metrics dir env var PROMETHEUS_MULTIPROC_DIR must ALWAYS exist
if it don't exist python cant set it.

ref: #469 #470
2025-01-14 16:13:19 +09:30
Jon
ed7452e587 fix(base): Dynammic settings determined by if metrics are enabled
metrics not enabled, dont add the settings for the app as collection still occurs

ref: #469 #470
2025-01-14 16:12:29 +09:30
Jon
39a11836f1 docs(administration): Add metrics
ref: #156 #469
2025-01-13 18:13:55 +09:30
Jon
b87286cd31 feat(base): Dont enable metrics by default
ref: #156 #469
2025-01-13 18:13:23 +09:30
Jon
b5a2717649 feat(base): Add exporter to celery
ref: #156 #469
2025-01-13 18:10:49 +09:30
Jon
cb3d645a34 feat(base): Add exporter to gunicorn
ref: #156 #469
2025-01-13 18:10:33 +09:30
Jon
6b6c05f07d feat(base): Add django-prometheus for metrics export
ref: #156 #469
2025-01-13 18:09:48 +09:30
Jon
7e72bab4ba docs(core): update success and failure admonition boxes
ref: #469 nofusscomputing/centurion_erp_ui#42
2025-01-12 19:30:30 +09:30
Jon
699a9608ef fix(access): Return API exception, not django
for current interface this exception will not work. however as the interface is depreciated, this bug is OK.

ref: #469
2025-01-12 17:43:04 +09:30
Jon
6528550fb8 fix(api): correctly return API exceptions for user to rectify
will return exactly as required for fields.

ref: #469
2025-01-12 17:41:40 +09:30
Jon
c778d4cf35 test(api): ensure documentation key and data is added to API metadata
ref: #469 closes #463
2025-01-12 17:04:27 +09:30
Jon
8bc7e62f2d docs(itam): Add path for OS docs
ref: #463 #469
2025-01-12 17:03:56 +09:30
Jon
e2da2b173d chore(api): remove empty string for documentation link
ref: #463 #469
2025-01-12 16:48:12 +09:30
Jon
6007668338 feat(api): fetch doc path for view metadata
ref: #463 #469
2025-01-12 16:46:14 +09:30
Jon
ba2d809566 fix(core): Set user whom added comment as comment user
ref: #460 #467
2025-01-09 17:42:06 +09:30
Jon
a6fda85c56 test(settings): check to ensure API fields returned are present and correct type for external_links model
ref: #467 #468
2025-01-09 17:40:01 +09:30
Jon
00215f6d0b feat(settings): Add new field button text
to enable the name field to be used as "friendly" name within interface

ref: #467 closes #468
2025-01-09 17:38:28 +09:30
Jon
31c125d820 docs(itim): Update external link docs with filter docs and new service context
ref: #467 #468
2025-01-09 15:45:53 +09:30
Jon
8f98f02818 feat(itim): Ability to add external link to a service
ref: #467 closes #468
2025-01-09 15:16:37 +09:30
Jon
b9824892ae feat(access): Add organization to team display_name
ref: #465 #467
2025-01-09 14:51:02 +09:30
Jon
76c71d68b0 test(assistance): Ensure category fields are present for model articles
ref: #465 #467
2025-01-09 14:47:14 +09:30
Jon
39307e7a0e feat(assistance): add category and org to model articles tab
ref: #465 #467
2025-01-09 14:35:17 +09:30
Jon
56fec0f34c docs(core): update markdown docs for recent model ref changes
ref: #465 #467
2025-01-09 14:18:26 +09:30
Jon
f9d82a5e92 feat(api): Enable fetching related ticket metadata for the other side of the related ticket
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-09 02:53:52 +09:30
Jon
229014eb8c fix(core): display_name is not a mandatory field for related ticket
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-09 02:53:06 +09:30
Jon
f67fad8927 fix(core): display_name is not a mandatory field for ticket linked item
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-09 02:52:53 +09:30
Jon
3e55c93674 feat(core): Add ticket comment field metadata to api meta
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-09 02:21:53 +09:30
Jon
4faafb8d27 feat(core): Add ticket linked item field metadata to api meta
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-09 02:21:34 +09:30
Jon
d33dd0fcff feat(core): Add related ticket field metadata to api meta
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-09 02:21:09 +09:30
Jon
af96e47126 feat(api): Add option to viewset to render field markdown metadata
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-09 02:19:23 +09:30
Jon
86b63acb00 feat(api): Add item metadata to markdown field for renderable items
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-09 00:29:42 +09:30
Jon
b65da4efac feat(api): Add item metadata to markdown field for renderable items
ref: #466 #467 nofusscomputing/centurion_erp_ui#40
2025-01-07 13:19:38 +09:30
Jon
f341adab8e fix(api): Ensure ALL required classes for viewset are inherited
ref: #459 #467
2025-01-07 13:14:14 +09:30
bc85c532dd build: bump version 1.6.0 -> 1.7.0 2025-01-04 10:53:44 +00:00
Jon
660eafe598 Merge pull request #452 from nofusscomputing/feature-next-release 2025-01-04 20:04:41 +09:30
Jon
2543047331 Merge pull request #459 from nofusscomputing/refactor-inventory 2025-01-04 19:51:37 +09:30
Jon
4ebff09671 fix(api): Ensure ALL required classes for viewset are inherited
ref: #459
2025-01-04 19:14:25 +09:30
Jon
e7601e311a test(access): Skip test case for appsettings different organization due to model not being tenancy model.
ref: #448 #459
2025-01-04 18:26:12 +09:30
Jon
1087dde2d5 test(access): Ensure items returned from query are from user organization and/or globally set organization
ref: #459 closes #448
2025-01-04 18:04:02 +09:30
Jon
dd72843ffb feat(access): Enable Objects from global organization to be viewable by user with the permission
ref: #448 #459
2025-01-03 12:14:26 +09:30
Jon
0d5f329146 feat(access): Enable Objects from globally set organization to return within query
ref: #448 #459
2025-01-03 12:00:46 +09:30
Jon
4b2a89c992 chore: test cleanup
ref: #459 closes #437
2025-01-03 10:09:38 +09:30
Jon
f218d8e2fa docs(roadmap): added release management
ref: #459
2025-01-03 10:07:50 +09:30
Jon
a4a9f2c3a9 feat(access): Enable the calling of the dynamic permissions function to obtain permissions
creates recursive loop

ref: #437 #459
2025-01-02 17:01:01 +09:30
Jon
e69c1e1b99 fix(itam): Dont query parent class for permissions
creates recursive loop

ref: #437 #459
2025-01-02 17:00:14 +09:30
Jon
0b362f04ee test(itam): API v2 Inventory Permission Check skip diff org
ref: #437 #459 #461
2025-01-02 16:57:30 +09:30
Jon
d1dc330744 test(itam): API v2 Inventory Permission Checks
ref: #437 #459
2025-01-02 16:54:55 +09:30
Jon
ed8f8ae411 test: mv inventory test to itam app
ref: #437 #459
2025-01-02 13:58:06 +09:30
Jon
d33cf96db3 fix(core): If no org specified serializer fetch, dont attempt to access
ref: #459
2025-01-01 18:33:30 +09:30
Jon
f7b444b8e4 fix(access): If no org specified during permission check, rtn false for permission
ref: #437 #459
2025-01-01 18:25:44 +09:30
Jon
1fd433e621 feat(itam): Cater for RabbitMQ errors when uploading inventory
ref: #437 #459
2025-01-01 17:31:39 +09:30
Jon
df037e59c9 fix(itam): return serializer for inventory endpoint
ref: #437 #459
2025-01-01 17:31:06 +09:30
Jon
ddbce0c0ce feat(itam): On Inventory upload validate existing device
ref: #437 #459
2024-12-31 14:10:35 +09:30
Jon
3c120291d2 refactor(itam): Device UUID field requires no default
ref: #437 #459
2024-12-31 13:29:37 +09:30
Jon
d6eea69c52 refactor(itam): mv inventory task to itam app
ref: #437
2024-12-31 11:32:18 +09:30
Jon
b32346d3f0 Merge pull request #456 from nofusscomputing/refactor-permission_checking 2024-12-28 21:54:48 +09:30
Jon
845a5fb473 test(access): Test Cases for Organization Permission Mixin
ref: #456 # closes #442
2024-12-28 21:37:01 +09:30
Jon
14b7c6d55b fix(api): base index must inherit from IndexViewset
ref: #442 #456
2024-12-28 19:53:56 +09:30
Jon
406fd1bb01 fix(core): Dont attempt to access the object if it doesn't exist when fetching ticket permissions
ref: #442 #456
2024-12-28 18:32:25 +09:30
Jon
4656617583 fix(access): Cached list objects must be a list including an empty one as required
ref: #442 #456
2024-12-28 18:31:53 +09:30
Jon
08b113b1ba feat(access): During permission checking also capture Http404
ref: #442 #456
2024-12-28 18:06:22 +09:30
Jon
a07dee370c refactor(access): Use exceptions for permission flow as required
ref: #442 #456
2024-12-28 17:33:11 +09:30
Jon
fbaf8770df feat(access): Super User to be granted permission
ref: #442 #456
2024-12-28 16:19:35 +09:30
Jon
e96916768e feat(access): Cache the permission required during permission checking
ref: #442 #456
2024-12-28 15:47:12 +09:30
Jon
8e1cf2401a fix(core): when gather ticket permissions, use getter as object may not exist
ref: #442 #456
2024-12-28 15:45:47 +09:30
Jon
580abaefa6 fix(core): action metadata to use view permission for tickets
ref: #442 #456
2024-12-28 15:11:50 +09:30
Jon
193c6c3b7f feat(api): Add IndexViewset to ViewSet mixin
ref: #442 #456
2024-12-27 23:03:39 +09:30
Jon
62fcb5aa01 test(api): Adjust test case for metadata visibility
view user only

ref: #442 #456
2024-12-27 22:28:12 +09:30
Jon
1c87eeb188 feat(access): If the user lacks the permission during permission checks, return sooner
ref: #442 #456
2024-12-27 18:51:10 +09:30
Jon
17e437ce68 fix(access): Use request.method for determining the HTTP/Method for permission checks
ref: #442 #456
2024-12-27 18:50:09 +09:30
Jon
7c62643c6c feat(access): Enforce view action and HTTP/Method match for permission checks
ref: #442 #456
2024-12-27 18:26:58 +09:30
Jon
f211f022a0 Merge pull request #454 from nofusscomputing/refactor-permission-checking 2024-12-26 21:55:21 +09:30
Jon
dc553317de refactor(api): dedup code within viewset mixin
ref: #442 #454
2024-12-26 20:52:27 +09:30
Jon
aee6ccfb7a test(core): remove different org testcase from history checks
this model is not a tenancy model yet. See #455 for details

ref: #442 #454 #455
2024-12-26 16:10:21 +09:30
Jon
10becacbf7 fix(access): Add HTTP/Method=DELETE as valid option for object delete/destroy.
ref: #442 #454
2024-12-26 15:31:02 +09:30
Jon
4545b3d721 test(core): When testing if history access is possible for user with perms, correct status is HTTP/200
ref: #442 #454
2024-12-26 14:12:07 +09:30
Jon
534186a7f9 fix(access): Ensure Object permission are checked when an object is having an action performed against it.
ref: #442 #454
2024-12-26 14:11:05 +09:30
Jon
4be1e97cbe refactor(access): Object permission checking moved to has_object_permission function
ref: #442 #454
2024-12-26 00:49:40 +09:30
Jon
f2181b018d refactor(access): move ability to get required permissions from permissions mixin to organization mixin
ref: #442 #454
2024-12-26 00:33:21 +09:30
Jon
d39f9ad463 refactor(core): move ticket linked item to dynamic parent model
now possible due to org mixins re-write

ref: #442 #454
2024-12-25 21:00:11 +09:30
Jon
6ff3d83222 refactor(api): Use new re-writen Mixins for Tenancy and Permission checks
ref: #442 #454
2024-12-25 20:59:14 +09:30
Jon
96ff5bd839 refactor(access): Organization Permission Mixin now caters for API ONLY
ref: #442 #454
2024-12-25 20:57:45 +09:30
Jon
d61929adaa refactor(access): Organization Mixin now caters for API ONLY
ref: #442 #454
2024-12-25 20:57:31 +09:30
Jon
04d1795a1b fix(core): History View is a read-only view
ref: #442 #454
2024-12-25 19:05:48 +09:30
Jon
7ced4cf524 fix(core): Permissions for Related ticket to be derived from ticket org
ref: #442 #454
2024-12-25 19:05:19 +09:30
Jon
bc1600e07b fix(access): Team User permission organiztion is team org
ref: #442 #454
2024-12-25 19:04:19 +09:30
Jon
2c715d69fa test(access): When adding org, test case must use non-super user
ref: #442 #454
2024-12-25 19:02:04 +09:30
Jon
595209709b test(itim): Ensure external_links are returned as part of _urls
ref: #450 #452
2024-12-24 16:44:13 +09:30
Jon
0db83614a7 feat(itim): External Links to display on cluster details page
ref: #450 #452
2024-12-24 16:40:15 +09:30
Jon
b13bfdb47d test(itim): Add API v2 permission checks for cluster services
ref: #452 fixes #451
2024-12-24 16:12:19 +09:30
Jon
0b6ec7bba8 test(itim): Add API v2 permission checks for device services
ref: #451 #452
2024-12-24 16:11:43 +09:30
Jon
1fcab6f245 feat(api): Add API v2 Endpoint for cluster services
ref: #451 #452
2024-12-24 16:10:57 +09:30
Jon
384b0e1d10 feat(api): distinguish between read-only and authenticateed user permissions
ref: #451 #452
2024-12-24 16:08:22 +09:30
bd31777331 build: bump version 1.5.0 -> 1.6.0 2024-12-23 07:50:39 +00:00
Jon
1df7499dab Merge pull request #424 from nofusscomputing/feature-next-release 2024-12-23 17:09:14 +09:30
Jon
c1cd9803b1 Merge pull request #443 from nofusscomputing/2024-12-23 2024-12-23 16:58:50 +09:30
Jon
54d653fa3a fix(core): Add missing KB article delete signal for ticket linking cleanup
ref: #443 closes #416
2024-12-23 16:45:00 +09:30
Jon
19cee0cbe2 chore(base): add TicketLinkedItem migration for item type
ref: #416 #443
2024-12-23 16:43:57 +09:30
Jon
4eb6064bd1 fix(core): Ensure for KB article permissions can be correctly checked
ref: #416 #443
2024-12-23 15:50:12 +09:30
Jon
729305fa3e fix(core): use cooorect model name for choices
ref: #416 #443
2024-12-23 15:49:37 +09:30
Jon
83a20f2b7b test(core): KB article delete ticket link clean up checks
ref: #416 #443
2024-12-23 15:49:05 +09:30
Jon
5f3db741f2 test(core): KB Ticket linking serializer checks
ref: #416 #443
2024-12-23 15:48:13 +09:30
Jon
9a2625ec3b test(core): KB Ticket linking permission checks
ref: #416 #443
2024-12-23 15:48:02 +09:30
Jon
d172db09b3 docs: add kb link reference
ref: #416 #443
2024-12-23 14:33:19 +09:30
Jon
c33416d977 Merge pull request #441 from nofusscomputing/2024-12-22 2024-12-22 21:38:58 +09:30
Jon
6c50088355 fix(itam): Use Device organization for device operating system
ref: #434 #441
2024-12-22 21:26:22 +09:30
Jon
2dfab2a2e4 fix(settings): remove field owner_organization from App Settings
ref: #441 fixes #439
2024-12-22 21:09:24 +09:30
Jon
0f5b2b6630 fix(core): Use object organization for ticket linked items
ref: #434 #441
2024-12-22 21:04:24 +09:30
Jon
60db1636a6 fix(itam): Use Software organization for Software Version
ref: #434 #441
2024-12-22 20:15:56 +09:30
Jon
f317ecb2e2 fix(itam): Use Operating System organization for OS Version
ref: #434 #441
2024-12-22 20:15:39 +09:30
Jon
7528adcd2f fix(itam): Use Device organization for device software
ref: #434 #441
2024-12-22 20:12:00 +09:30
Jon
c84c0f5d82 fix(core): Use Ticket organization for ticket linked items
ref: #434 #441
2024-12-22 20:11:34 +09:30
Jon
8ed3e38403 fix(core): Use parent model organization for object notes
ref: #434 #441
2024-12-22 19:51:53 +09:30
Jon
6c95105528 refactor(access): Adjust permission check logic to use try..catch instead of gettattr due to base method throwing exception
if method is not overridden, the base class throws an exception instead of returning None

ref: #434 #441
2024-12-22 19:02:21 +09:30
Jon
40e2da5d8f fix(access): During permission checking also use get_serializer if avail
ref: #434 #441
2024-12-22 18:15:03 +09:30
Jon
116655cf2e fix(access): default to empty when attempting to get view attribute
ref: #434 #441
2024-12-22 17:45:39 +09:30
Jon
3d47a7157a test(core): Add data for ticket comment does not use organization field
this fields value is the tickets org value

ref: #441 fixes #434
2024-12-22 17:24:47 +09:30
Jon
796936f780 fix(core): Use ticket organization for permission checking for adding a comment
ref: #441 fixes #434
2024-12-22 17:23:55 +09:30
Jon
9b528c2c0a feat(access): Check if organization field is read-only during permission check
ref: #434 #441
2024-12-22 17:22:52 +09:30
Jon
47df49012d feat(access): Ability to specify parent model for permission to do
ref: #434 #441
2024-12-22 17:21:13 +09:30
Jon
4f7ef306e2 feat(information_management): add cluster type kb article linking
ref: #424
2024-12-21 19:55:00 +09:30
Jon
dfee07dc41 Merge pull request #426 from nofusscomputing/2024-12-19 2024-12-21 19:32:15 +09:30
Jon
77b52972bd fix(itam): KB url must use obj not item when building ursl for device type
ref: #426
2024-12-21 18:27:58 +09:30
Jon
47d0fe0c68 fix(itam): KB url must use obj not item when building ursl for device model
ref: #426
2024-12-21 18:27:48 +09:30
Jon
dcd9e91dd9 refactor(base): move model calling of clean to tenancy model class
ref: #426 #433
2024-12-21 17:58:13 +09:30
Jon
32430f8f10 test: revert test case changes from 1c065601f6
ref: #426
2024-12-21 17:56:47 +09:30
Jon
8457eb6bd9 docs(development): add requirement that tenancy model needs kb article linking
ref: #331 #426 #427
2024-12-21 17:38:09 +09:30
Jon
11cb476055 feat(information_management): Ability to link Knowledge Base article to a Software
ref: #426 closes #331 closes #427 closes #432
2024-12-21 17:20:20 +09:30
Jon
d34e716b81 feat(information_management): Ability to link Knowledge Base article to a Software
ref: #331 #426 #427 closes #431
2024-12-21 17:20:05 +09:30
Jon
7122b7c56d feat(information_management): Ability to link Knowledge Base article to a Software Category
ref: #331 #426 #427 #431
2024-12-21 17:20:05 +09:30
Jon
44158ebe80 feat(information_management): Ability to link Knowledge Base article to a Operating System Version
ref: #331 #426 #427 closes #430
2024-12-21 17:20:05 +09:30
Jon
4b4c534b00 feat(information_management): Ability to link Knowledge Base article to a Operating System
ref: #331 #426 #427 closes #429
2024-12-21 17:20:05 +09:30
Jon
dcc525bfa8 feat(information_management): Ability to link Knowledge Base article to a Device
ref: #331 #426 #427 closes #428
2024-12-21 17:20:05 +09:30
Jon
4ce8f0fa3e feat(information_management): Ability to link Knowledge Base article to a Device Type
ref: #331 #426 #427 #428
2024-12-21 17:20:05 +09:30
Jon
81dbc30027 feat(information_management): Ability to link Knowledge Base article to a Device Model
ref: #331 #426 #427 #428
2024-12-21 17:20:05 +09:30
Jon
c2ad23834e feat(information_management): Ability to link Knowledge Base article to an External Link
ref: #426 #427
2024-12-21 17:10:53 +09:30
Jon
11169d8722 feat(information_management): Ability to link Knowledge Base article to a Project
ref: #426 #427
2024-12-21 17:10:34 +09:30
Jon
e34a5eec5b feat(information_management): Ability to link Knowledge Base article to a Project Type
ref: #426 #427
2024-12-21 17:10:20 +09:30
Jon
4bddbd151d feat(information_management): Ability to link Knowledge Base article to a Project State
ref: #426 #427
2024-12-21 17:10:09 +09:30
Jon
143506a020 feat(information_management): Ability to link Knowledge Base article to a Project Milestone
ref: #426 #427
2024-12-21 17:09:31 +09:30
Jon
2fb938256b feat(information_management): Ability to link Knowledge Base article to a Service
ref: #426 #427
2024-12-21 17:08:30 +09:30
Jon
8df8f7c22b feat(information_management): Ability to link Knowledge Base article to a Port
ref: #426 #427
2024-12-21 17:08:17 +09:30
Jon
8e73d163c7 feat(information_management): Ability to link Knowledge Base article to a Cluster Type
ref: #426 #427
2024-12-21 17:08:06 +09:30
Jon
64dbf24220 feat(information_management): Ability to link Knowledge Base article to a Cluster
ref: #426 #427
2024-12-21 17:07:49 +09:30
Jon
bdda61fc0b feat(information_management): Ability to link Knowledge Base article to a Ticket Category
ref: #426 #427
2024-12-21 17:07:09 +09:30
Jon
803491f048 feat(information_management): Ability to link Knowledge Base article to a Manufacturer
ref: #426 #427
2024-12-21 17:06:49 +09:30
Jon
b66e4bac48 feat(information_management): Ability to link Knowledge Base article to a Config Group
ref: #426 #427
2024-12-21 17:06:30 +09:30
Jon
63d44ed6e8 feat(information_management): Ability to link Knowledge Base article to a Team
ref: #426 #427
2024-12-21 17:06:05 +09:30
Jon
18769635ff feat(information_management): Ability to link Knowledge Base article to an Organization
ref: #426 #427
2024-12-21 17:05:46 +09:30
Jon
cbd1af7322 test(information_management): Add model test cases for Model KB Article
ref: #331 #426 #427 #428 #429 #430 #431 #432
2024-12-21 17:02:02 +09:30
Jon
921e072e23 test(information_management): Add API v2 Endpoint test cases for Model KB Article
ref: #331 #426 #427 #428 #429 #430 #431 #432
2024-12-21 17:01:49 +09:30
Jon
d6a0cde203 test(information_management): Add Viewset test cases for Model KB Article
ref: #331 #426 #427 #428 #429 #430 #431 #432
2024-12-21 17:01:35 +09:30
Jon
bd700337fd test(information_management): Add Serializer test cases for Model KB Article
ref: #331 #426 #427 #428 #429 #430 #431 #432
2024-12-21 17:01:24 +09:30
Jon
7961a236dd feat(information_management): Add API v2 Endpoint for model KB articles
ref: #331 #426 #427 #428 #429 #430 #431 #432
2024-12-21 17:00:47 +09:30
Jon
d31eba4bf4 feat(information_management): Add method get_url to model kb article
set to RTN none as not required.

ref: #331 #426 #427 #428 #429 #430 #431 #432
2024-12-21 16:58:40 +09:30
Jon
52553b46a5 fix(core): Add missing migrations for linking kb to ticket
ref: #426
2024-12-21 16:57:22 +09:30
Jon
1c065601f6 test(api): mv test case change denied delete to apipermissionchange test cases
this test only works when there is a change user, so it's belongs with change use test cases.

ref: #426
2024-12-21 16:56:28 +09:30
Jon
6498b639c5 feat(information_management): DB Model for linking KB articles to models
ref: #331 #426 #427 #428 #429 #430 #431 #432
2024-12-20 18:10:13 +09:30
Jon
ea74f48e78 feat(assistanace): remove kb article content from details tab
not required as content is on its own tab.

ref: #426
2024-12-20 14:20:52 +09:30
Jon
14f1935b77 feat(core): call models clean method prior to saving model to DB
ref: #426 #433
2024-12-20 14:01:54 +09:30
Jon
c649dc7669 test(base): Ensure Models inherit from Tenancy and SaveHistory Classes
ref: #426
2024-12-20 13:22:43 +09:30
Jon
56112b7ce8 revert(api): during permission checking, if model is an organization and the user is a manager allow access to the organization.
ref: #425 #426
2024-12-20 12:17:57 +09:30
Jon
e282d9967c feat(api): during permission checking, if model is an organization and the user is a manager allow access to the organization.
ref: #425 #426
2024-12-20 12:16:56 +09:30
Jon
5b27e337f4 feat(api): If user is organization manager of any org, show organization within navigation
ref: #425 #426
2024-12-19 18:44:34 +09:30
Jon
2ff7cd684c fix(core): Ensure that a user cant reply to a discussion reply
ref: #421 #426
2024-12-19 18:20:21 +09:30
Jon
d5a3ae046b test(core): test to ensure that a user cant reply to a comment that is already part of a discussion
ref: #421 #426
2024-12-19 18:19:08 +09:30
Jon
e32b901c36 test(core): test to ensure that a user can reply to a comment (start comment)
ref: #421 #426
2024-12-19 18:18:42 +09:30
Jon
15c3fdbcae fix(core): Add Org, Team and KB article to ticket linked Item serializer
ref: #416 #421 #426
2024-12-19 16:24:17 +09:30
Jon
27c4a558bd fix(core): Ticket Linked Item serializer removed from inheriting from common serializer.
see https://github.com/nofusscomputing/centurion_erp/issues/421#issuecomment-2552893083

ref: #421 #426
2024-12-19 16:00:43 +09:30
Jon
57522dc0de fix(core): Ticket model serializer must inherit from common serializer
ref: #421 #426
2024-12-19 15:00:52 +09:30
Jon
042594dd5c fix(core): Ticket Related Item model serializer must inherit from common serializer
ref: #421 #426
2024-12-19 15:00:42 +09:30
Jon
2ae78fdfa3 fix(core): Ticket Linked Item model serializer must inherit from common serializer
ref: #421 #426
2024-12-19 15:00:25 +09:30
Jon
1b223135e8 fix(core): Ticket Comment model serializer must inherit from common serializer
ref: #421 #426
2024-12-19 15:00:12 +09:30
Jon
f1fc5f27c7 fix(core): Notes model serializer must inherit from common serializer
ref: #421 #426
2024-12-19 14:59:53 +09:30
Jon
607fcb368f docs(core): Add kb, org and team to slash command
ref: #274 #416 #426
2024-12-19 14:51:48 +09:30
Jon
88b79bf94f feat(core): Link Team to ticket
ref: #274 #426
2024-12-19 14:20:37 +09:30
Jon
5c324af5d3 feat(core): Link Organization to ticket
ref: #274 #426
2024-12-19 14:19:55 +09:30
Jon
85914f4848 feat(core): Link KB to ticket
ref: #274 #426
2024-12-19 14:07:46 +09:30
Jon
cc98966a76 feat(access): Add project_management permissions to teams avail permissions
ref: #421
2024-12-19 13:40:27 +09:30
Jon
aa33ccc099 Merge pull request #423 from nofusscomputing/fix-422-to-many-redirects 2024-12-17 16:46:10 +09:30
Jon
26ac825673 fix(docker): Correct nginx proxy headers passed to gunicorn
ref: #423 fixes #422
2024-12-12 14:03:31 +09:30
Jon
34b075243a fix(core): Generate the correct url for a ticket comment when it's a discussion
ref: #424
2024-12-11 16:50:49 +09:30
Jon
eb59985909 fix(core): organization field set to write_only=True
ref: #424
2024-12-11 16:47:08 +09:30
Jon
6582905319 chore(core): Add dummy ticket comment serializer so drf html api browser works
ref: #424
2024-12-11 15:02:42 +09:30
Jon
c788ead97a fix(core): If ticket comment is a reply, add the parent id post validation
ref: #424 nofusscomputing/centurion_erp_ui#29
2024-12-11 14:58:54 +09:30
Jon
66498ce917 refactor(core): Add ticket comment organization post validation
ref: #422
2024-12-11 14:56:05 +09:30
Jon
0731efb039 refactor(docker): gunicorn config moved to con file
ref: #422
2024-12-10 10:37:22 +09:30
Jon
391dbe80c3 docs(admin): fluff the install instructions
ref: #422
2024-12-10 10:21:41 +09:30
Jon
c1db53e94a docs: correct collection path
ref: #422
2024-12-10 10:20:59 +09:30
39e06a43a3 build: bump version 1.4.1 -> 1.5.0 2024-12-09 15:10:29 +00:00
Jon
0ceb5a512e Merge pull request #411 from nofusscomputing/feat-next-release 2024-12-10 00:28:06 +09:30
Jon
51a2fe1141 Merge pull request #418 from nofusscomputing/2024-12-08 2024-12-09 23:55:44 +09:30
Jon
8332b31a1a docs(release): added next release version
ref: #418
2024-12-09 23:43:58 +09:30
Jon
c03b7e7d49 feat(python): update django 5.1.2 -> 5.1.4
ref: #408 #418
2024-12-09 23:28:44 +09:30
Jon
ed6cdaef8b docs(pr): add migrations task
ref: #408 #418
2024-12-09 23:26:42 +09:30
Jon
5335758c70 docs(admin): Include new UI
ref: #408 #418
2024-12-09 23:21:36 +09:30
Jon
c14ee4c4be feat(api): If global organization defined, filter from ALL organization fields
This field is not intended to be selectable

ref: #418 closes #406
2024-12-09 22:29:57 +09:30
Jon
b51ce7d513 docs(api): add test info for nav menu
ref: #409 #418
2024-12-08 18:43:52 +09:30
Jon
03c39d2e2f test(api): Nav menu permission checks for settings
ref: #418 closes #409
2024-12-08 18:38:38 +09:30
Jon
10285bedef feat(api): Add nav menu permission checks for settings
ref: #409 #418
2024-12-08 18:38:16 +09:30
Jon
b9e8caecc1 test(api): Nav menu permission checks
ref: #409 #418
2024-12-08 17:30:11 +09:30
Jon
afc0c66602 Merge pull request #417 from nofusscomputing/2024-12-06 2024-12-06 17:26:22 +09:30
Jon
41ffe5b3bc refactor(access): Settings must be an available permissions when setting team permissions
ref: #408 #417
2024-12-06 17:06:38 +09:30
Jon
e158f49a21 refactor(itam): set deviceoperatingsystem model, device field to be type onetoone
ref: #417
2024-12-06 16:40:58 +09:30
Jon
18bb2909a5 docs: update release notes re migration squash
ref: #408 #417
2024-12-06 16:34:13 +09:30
Jon
ca2da06d2c chore: squash previous releases migrations
Every release that occurs is squash ALL migrations to limit the amount of migrations

ref: #408 #417
2024-12-06 16:33:13 +09:30
Jon
17f47040d6 fix(settings): Add missing get_url function to user_settings model
ref: #412 #417 closes #410
2024-12-06 15:57:36 +09:30
Jon
c5faf3115d fix(settings): Add missing get_url function to app_settings model
ref: #410 #412 #417
2024-12-06 15:57:11 +09:30
Jon
3cdd8adf38 test(core): Correct url.selfchecks to use list view
history uses curtom view and has no detail

ref: #410 #412 #417
2024-12-06 15:30:23 +09:30
Jon
39539a4bae test(core): Dont test History for table view
this view has a seperate view, History.

ref: #410 #412 #417
2024-12-06 15:04:46 +09:30
Jon
5de8893330 fix(core): correctr the required parameters for related ticket serializer when fetching own url
ref: #410 #412 #417
2024-12-06 14:49:47 +09:30
Jon
d9b9e32019 test(settings): Dont test user settings for table view
this view not expected to be

ref: #410 #417 closes #412
2024-12-06 14:28:38 +09:30
Jon
3bce54b495 test(steeings): Dont test app settings for table view
this view not expected to be

ref: #410 #412 #417
2024-12-06 14:27:58 +09:30
Jon
34c327b7b6 test(core): Dont test related ticket for table or detail view
this view not expected to be

ref: #410 #412 #417
2024-12-06 14:27:25 +09:30
Jon
8b790b451e test(api): Refactor test so that endpoints not expected to have an endpoint or be rendered in a table wont be tested for it.
ref: #410 #412 #417
2024-12-06 14:24:54 +09:30
Jon
00bebbd8f4 fix(core): Remove requirement that ticket be specified for related tickets get_url
ref: #412 #417
2024-12-06 14:19:04 +09:30
Jon
cebb02de99 feat(api): When fething an items url dueing metadata creation, used named parameters
ref: #412
2024-12-06 14:15:47 +09:30
Jon
ebeea4f526 feat(access): Modify Admin User panel by removing perms and adding teams
ref: #408
2024-12-05 14:30:59 +09:30
Jon
c91bc6ee10 fix(access): Add missing table_fields attribute to team users model
ref: nofusscomputing/centurion_erp_ui#29
2024-12-05 07:23:42 +09:30
Jon
625cb52dd2 Merge pull request #415 from nofusscomputing/2024-12-01 2024-12-05 00:04:47 +09:30
Jon
497adc68f4 fix(api): during metadata navigation permission checks, cater for non-existant keys
ref: #410 #412 #415
2024-12-04 23:37:09 +09:30
Jon
a10f1b3694 test(settings): API Metadata checks for user settings
ref: #410 #412 #415
2024-12-04 23:22:52 +09:30
Jon
11abf177ab test(settings): API Metadata checks for external links
ref: #410 #412 #415
2024-12-04 23:22:34 +09:30
Jon
becf55e22f test(settings): API Metadata checks for app settings
ref: #410 #412 #415
2024-12-04 23:22:22 +09:30
Jon
c57d465c5b test(project_management): API Metadata checks for project type
ref: #410 #412 #415
2024-12-04 23:22:05 +09:30
Jon
741a149f33 test(project_management): API Metadata checks for project task
ref: #410 #412 #415
2024-12-04 23:21:57 +09:30
Jon
f85cc0fd3d test(project_management): API Metadata checks for project state
ref: #410 #412 #415
2024-12-04 23:21:49 +09:30
Jon
80a82605aa test(project_management): API Metadata checks for project milestone
ref: #410 #412 #415
2024-12-04 23:21:40 +09:30
Jon
d9b5ec7d41 test(project_management): API Metadata checks for project
ref: #410 #412 #415
2024-12-04 23:21:31 +09:30
Jon
fcf3d568e4 test(itim): API Metadata checks for problem ticket
ref: #410 #412 #415
2024-12-04 23:21:13 +09:30
Jon
eb3071c93d test(itim): API Metadata checks for incident ticket
ref: #410 #412 #415
2024-12-04 23:21:04 +09:30
Jon
873f241d14 test(itim): API Metadata checks for change ticket
ref: #410 #412 #415
2024-12-04 23:20:56 +09:30
Jon
da5c4d76e9 test(itim): API Metadata checks for service
ref: #410 #412 #415
2024-12-04 23:20:43 +09:30
Jon
8f1e61a7a6 test(itim): API Metadata checks for port
ref: #410 #412 #415
2024-12-04 23:20:34 +09:30
Jon
7f46daeb54 test(itim): API Metadata checks for cluster type
ref: #410 #412 #415
2024-12-04 23:20:26 +09:30
Jon
6291510ba4 test(itim): API Metadata checks for cluster
ref: #410 #412 #415
2024-12-04 23:20:20 +09:30
Jon
871cdc6b5d test(itam): API Metadata checks for software version
ref: #410 #412 #415
2024-12-04 23:20:10 +09:30
Jon
9e78aa5940 test(itam): API Metadata checks for software category
ref: #410 #412 #415
2024-12-04 23:19:59 +09:30
Jon
4df7e57ca7 test(itam): API Metadata checks for software
ref: #410 #412 #415
2024-12-04 23:19:52 +09:30
Jon
b80d8a5c64 test(itam): API Metadata checks for operating system version
ref: #410 #412 #415
2024-12-04 23:19:42 +09:30
Jon
f3ef3be883 test(itam): API Metadata checks for operating system
ref: #410 #412 #415
2024-12-04 23:19:33 +09:30
Jon
250ba96c84 test(itam): API Metadata checks for software
ref: #410 #412 #415
2024-12-04 23:19:19 +09:30
Jon
df5234e8d3 test(itam): API Metadata checks for operating system
ref: #410 #412 #415
2024-12-04 23:19:11 +09:30
Jon
c4459bd21f test(itam): API Metadata checks for device type
ref: #410 #412 #415
2024-12-04 23:18:54 +09:30
Jon
702644adc5 test(itam): API Metadata checks for device OS
ref: #410 #412 #415
2024-12-04 23:18:45 +09:30
Jon
c9caa96f98 test(itam): API Metadata checks for device model
ref: #410 #412 #415
2024-12-04 23:18:36 +09:30
Jon
eb4a132f39 test(itam): API Metadata checks for device
ref: #410 #412 #415
2024-12-04 23:18:28 +09:30
Jon
cb636fff01 test(core): API Metadata checks for ticket comment category
ref: #410 #412 #415
2024-12-04 23:18:14 +09:30
Jon
f8338ff6f0 test(core): API Metadata checks for ticket comment
ref: #410 #412 #415
2024-12-04 23:18:04 +09:30
Jon
47898d7e1d test(core): API Metadata checks for ticket category
ref: #410 #412 #415
2024-12-04 23:17:54 +09:30
Jon
2be5819839 test(core): API Metadata checks for history
ref: #410 #412 #415
2024-12-04 23:17:45 +09:30
Jon
c0d5bfad45 test(core): API Metadata checks for related tickets
ref: #410 #412 #415
2024-12-04 23:17:35 +09:30
Jon
cadb3bcac0 test(core): API Metadata checks for manufacturers
ref: #410 #412 #415
2024-12-04 23:17:19 +09:30
Jon
089f8beef2 test(config_management): API Metadata checks for config group software
ref: #410 #412 #415
2024-12-04 23:17:00 +09:30
Jon
d5771401c8 test(config_management): API Metadata checks for config groups
ref: #410 #412 #415
2024-12-04 23:16:50 +09:30
Jon
a32d942db6 test(access): API Metadata checks for request ticket
ref: #410 #412 #415
2024-12-04 23:16:31 +09:30
Jon
2ef5124ccc test(access): API Metadata checks for kb category
ref: #410 #412 #415
2024-12-04 23:16:17 +09:30
Jon
b54d710c50 test(access): API Metadata checks for kb
ref: #410 #412 #415
2024-12-04 23:16:07 +09:30
Jon
fd3bd7f04e test(api): correct metadata testcases
ref: #412 #415
2024-12-04 23:14:35 +09:30
Jon
61f6996f5e test(access): API Metadata checks for organization
ref: #412 #415
2024-12-04 20:20:35 +09:30
Jon
2b2c719e69 test(api): API Metadata test cases for navigation menu rendering
ref: #412 #415
2024-12-04 20:20:02 +09:30
Jon
f13bdf5a05 test(api): correct logic for test class attribute fetching
ref: #415
2024-12-04 20:11:18 +09:30
Jon
6010973c3b fix(core): Remove superfluous check from ticket viewset
was fething the users default org wich is not required nor was it used

ref: #415 fixes #403
2024-12-04 17:52:11 +09:30
Jon
85face7cc6 fix(access): Team permissions is not a required field
ref: #404 #415
2024-12-04 17:30:19 +09:30
Jon
38ba86b8b5 feat(access): filter permissions available
only show used permissions

ref: #415 closes #404
2024-12-04 17:30:01 +09:30
Jon
d0118e1f6f feat(api): Filter navigation menu by user permissions
if the user has the permission they will have the nav menu.

ref: #409 #415
2024-12-03 17:13:59 +09:30
Jon
827fe14369 fix(core): History query must also be for self, not just children
ref: #414 #415
2024-12-01 11:12:47 +09:30
Jon
6ed4db0502 feat(api): Add API version details to the metadata
ref: #411 nofusscomputing/centurion_erp_ui#29
2024-11-30 16:13:20 +09:30
75cf55fe6a build: bump version 1.4.0 -> 1.4.1 2024-11-30 06:12:29 +00:00
Jon
b160c034e5 fix(itam): When validating device config, only do so if there is config defined
ref: fixes #407
2024-11-30 15:30:02 +09:30
Jon
deb93378b0 test(access): API Metadata checks for Team User model
ref: #408 #410 #411 #412
2024-11-30 15:00:43 +09:30
Jon
1904c2e28c test(access): API Metadata checks for Team model
ref: #408 #410 #411 #412
2024-11-30 15:00:26 +09:30
Jon
aaf2d23c53 test(api): API Metadata functional Test Cases
ref: #408 #411 #412
2024-11-30 14:56:00 +09:30
Jon
7c9320a84b feat(access): add back and return_url urls to team user metadata
ref: #410 #411
2024-11-30 14:03:39 +09:30
Jon
c8b6a31cd4 feat(access): add back and return_url urls to team metadata
ref: #410 #411
2024-11-30 14:03:31 +09:30
Jon
22615e46ef fix(access): correct team users table to correct data key
ref: #411
2024-11-30 13:58:47 +09:30
Jon
4ae965603c feat(api): Add back url to metadata
ref: #410 #411
2024-11-30 13:58:00 +09:30
Jon
e4ce1b539e feat(api): Add return_url to metadata
ref: #410 #411
2024-11-30 13:57:31 +09:30
Jon
cee396da3f refactor(assistance): make content the first tab for kb articles
ref: #411 closes #405
2024-11-30 12:55:59 +09:30
Jon
0786977633 refactor(api): move metadata url_return -> urls.self
ref: #411 nofusscomputing/centurion_erp_ui#29 nofusscomputing/centurion_erp_ui#33
2024-11-30 06:15:35 +09:30
1093c55c19 build: bump version 1.3.1 -> 1.4.0 2024-11-28 15:54:17 +00:00
Jon
069251d68c Merge pull request #344 from nofusscomputing/feature-v1-3 2024-11-29 01:13:43 +09:30
Jon
8050a7a8f0 Merge pull request #401 from nofusscomputing/related-ticket 2024-11-29 01:03:45 +09:30
Jon
2f259eacd4 docs(development): added model page_layout and table_fields attributes
ref: #248 #401 closes #347
2024-11-29 00:51:27 +09:30
Jon
184f419905 test(project_management): Ensure that project field completed exists when API v2 is rendere
ref: #401 fixes #327
2024-11-29 00:19:51 +09:30
Jon
545d4176b2 fix(project_management): Correct All tickets query for calculating project completion
ref: #327 #401
2024-11-29 00:19:11 +09:30
Jon
1d9d426601 feat(project_management): add project completed field
ref: #248 #401
2024-11-29 00:13:52 +09:30
Jon
bcf353bee6 test(core): Ensure a ticket cant be related to itself
ref: #401 fixes #326
2024-11-28 23:51:55 +09:30
Jon
795c6985a7 fix(core): Prevent a ticket from being related to itself
ref: #326 #401
2024-11-28 23:51:14 +09:30
Jon
d923490ff3 Merge pull request #397 from nofusscomputing/359-returned-results 2024-11-28 03:26:43 +09:30
Jon
de987f1fee fix(core): when fetching ticket serializer set org=None
ref: #248 #397 closes #359
2024-11-28 03:16:52 +09:30
Jon
b291b989b1 fix(core): use the view pk to filter self out for ticket category update
ref: #248 #359
2024-11-28 02:58:45 +09:30
Jon
ba85c694ba test(itam): correct test setup for device note viewset
ref: #248 #359 #397
2024-11-28 02:58:45 +09:30
Jon
ae2891f0ac test(settings): Ensure items returned are from users orgs only for API v2 endpoints
ref: #248 #359 #397
2024-11-28 02:58:45 +09:30
Jon
346b41cc26 test(project_management): Ensure items returned are from users orgs only for API v2 endpoints
ref: #248 #359 #397
2024-11-28 02:58:45 +09:30
Jon
3d980de05c test(itim): Correct test case for ticket category returned serializer checks
ref: #248 #359
2024-11-28 02:58:45 +09:30
Jon
4db65bcbad test(core): Correct test case for ticket category returned serializer checks
ref: #248 #359
2024-11-28 02:58:45 +09:30
Jon
baa4f68004 test(core): Ensure items returned are from users orgs only for API v2 endpoints
ref: #248 #359 #397
2024-11-28 02:58:44 +09:30
Jon
dd3c8e51d2 test(config_management): Ensure items returned are from users orgs only for API v2 endpoints
ref: #248 #359 #397
2024-11-28 02:58:44 +09:30
Jon
42621e33a2 test(assistance): Ensure items returned are from users orgs only for API v2 endpoints
ref: #248 #359 #397
2024-11-28 02:58:44 +09:30
Jon
4544c0768d test(access): Ensure items returned are from users orgs only for API v2 endpoints
ref: #248 #359 #397
2024-11-28 02:58:44 +09:30
Jon
0cda597a2d test(itam): Ensure items returned are from users orgs only for API v2 endpoints
ref: #248 #359 #397
2024-11-28 02:58:44 +09:30
Jon
c3547a49eb test: Test Case for viewsets that confirms returned results from user orgs only
ref: #248 #397
2024-11-28 02:58:44 +09:30
Jon
579e55af08 docs: update roadmap
ref: #397
2024-11-28 02:58:44 +09:30
Jon
82ed07e62c test(itam): update device model test name Device -> DeviceModel
ref: #15 #392
2024-11-28 02:22:29 +09:30
Jon
e10a4972af feat(api): Implement Sanity error handling for uncaught exceptions
ref: #15 #392 closes #387
2024-11-28 02:22:29 +09:30
Jon
e17de299f1 test(Core): Ticket linked items API V2 Serializer returned checks
ref: #15 #392 closes #393
2024-11-28 02:22:29 +09:30
Jon
ab6a965ef1 test(Core): Remove duplicate test for ticket linked items
ref: #15 #392 #393
2024-11-28 02:22:29 +09:30
Jon
c09baf0204 test(assistance): Project Taask ticket Viewset Serializer checks
ref: #15 #392 #393
2024-11-28 02:22:29 +09:30
Jon
0d9cab032b test(assistance): Problem ticket Viewset Serializer checks
ref: #15 #392 #393
2024-11-28 02:22:29 +09:30
Jon
3a132e2cd9 test(assistance): Incident ticket Viewset Serializer checks
ref: #15 #392 #393
2024-11-28 02:22:29 +09:30
Jon
f9209e8bc7 test(assistance): Change ticket Viewset Serializer checks
ref: #15 #392 #393
2024-11-28 02:22:29 +09:30
Jon
2429a94c7d test(assistance): Request ticket Viewset Serializer checks
ref: #15 #392 #393
2024-11-28 02:22:29 +09:30
Jon
7acb73f9da test(core): Ticket Test Cases for Viewset Serializer returned
ref: #15 #392 #393
2024-11-28 02:22:29 +09:30
Jon
87108e9d05 fix(core): Ensure for update of ticket the correct serializer is selected
ref: #15 #392 #393
2024-11-28 02:22:29 +09:30
Jon
faf441b338 test: during delete operation dont include data
ref: #15 #392
2024-11-28 02:22:29 +09:30
Jon
cad845267c fix(core): dont exclude self for ticket comment category if not exists
ref: #392
2024-11-28 02:22:29 +09:30
Jon
2647bbd522 chore: correct linting error
ref: #392
2024-11-28 02:22:29 +09:30
Jon
ad54494df0 test: Add ViewSet Returned Serializer Checks to a majority of models
more to come

ref: #15 #248 #392 #393
2024-11-28 02:22:29 +09:30
Jon
95ac6a4277 test: Test Cases to confirm the correct serializer is returned from ViewSet
ref: #15 #248 #392 #393
2024-11-28 02:22:29 +09:30
Jon
8cca6e3a9e test: Added skipped test for checking model mandatory values.
see test __doc__ for skip reason

ref: #15 #248 #392
2024-11-28 02:22:29 +09:30
Jon
e9298d7b89 feat(itam): Split device software serializer to include seperate software installs serializer
ref: #248 #392 closes #386
2024-11-28 02:22:29 +09:30
Jon
89c3feee18 fix(itam): Add Operating System API v2 field typo
ref: #248 #391
2024-11-28 02:22:28 +09:30
Jon
59f842b3aa feat(itam): Add Operating System Installs API v2 endpoint
ref: #248 #391
2024-11-28 02:22:28 +09:30
Jon
426f7ab512 test(itam): Operating System Installs API v2 Field checks
ref: #15 #248 #391
2024-11-28 02:22:28 +09:30
Jon
9f1e04f078 test(itam): Software Installs API v2 Permission checks
ref: #15 #248 #391
2024-11-28 02:22:28 +09:30
Jon
5fe1e39e0d test(itam): Operating_system Installs API v2 Validation checks
ref: #15 #248 #391
2024-11-28 02:22:28 +09:30
Jon
dd4e6242b5 refactor(itam): update device software serializer validator
ref: #248 #391
2024-11-28 02:22:28 +09:30
Jon
86f4a2f00f test(itam): Software Installs API v2 Permission checks
ref: #15 #248 #391
2024-11-28 02:22:28 +09:30
Jon
3188818247 test(itam): Software Installs API v2 Validation checks
ref: #15 #248 #391
2024-11-28 02:22:28 +09:30
Jon
ad7f3870d0 refactor(itam): update device software serializer validator
ref: #248 #391
2024-11-28 02:22:28 +09:30
Jon
79fbd400e5 test(itam): Software Installs API v2 Field checks
ref: #248 #391
2024-11-28 02:22:28 +09:30
Jon
2ac9137068 feat(itam): based off of the request kwaargs, adjust device serializer fields accordingly
for a device, make field read only
for software make field read only

ref: #248 #391
2024-11-28 02:22:28 +09:30
Jon
56b5c2c210 feat(itam): Add Software installs endpoint
ref: #248 #391
2024-11-28 02:22:28 +09:30
Jon
3c88a556d3 feat(itim): add cluster and device to Services in new UI
ref: #248 #390 nofusscomputing/centurion_erp_ui#29
2024-11-28 02:22:28 +09:30
Jon
f1780cca7a feat(config_management): add hosts to new UI
ref: #248 #390 nofusscomputing/centurion_erp_ui#29
2024-11-28 02:22:28 +09:30
Jon
6fe6c58828 feat(api): add ticket icons
ref: #248 #390 nofusscomputing/centurion_erp_ui#29
2024-11-28 02:22:28 +09:30
Jon
96c4c59bae docs(release_notes): Notate API v2 is beta and subject to change
ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
058eb47df7 test(core): Ticket serializer checks corrected to use project_id within mock view
ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
e2c059cacd test(core): Ticket comment serializer checks corrected to use mock view
ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
49554f7b68 fix(core): Enusure project_task serializer sets the project_id
ref: #248 #390 nofusscomputing/centurion_erp_ui#29
2024-11-28 02:22:28 +09:30
Jon
92b1222df3 feat(itim): Add nodes and devices to detail view
ref: #248 #390 nofusscomputing/centurion_erp_ui#29
2024-11-28 02:22:28 +09:30
Jon
5b8da99ba2 fix(itam): device os serializer not to show org and device
these fields supplied by the serializer

ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
7551a38f49 feat(api): return_url to default to list view
ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
09f432f900 test(core): Ticket comment category field checks corrected
ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
2e6db419b2 feat(base): move setting SECURE_SSL_REDIRECT = True to etc/settings
ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
c6a1790b7d feat(base): use senisible settings for SSL
ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
855d5b0062 fix(core): ticket comment to use model serializer for meta
ref: #248 #390
2024-11-28 02:22:28 +09:30
Jon
a35684d1d2 test(itam): Update Device Operating System history checks to cater for unique device constratint
ref: #248 #390 #362
2024-11-28 02:22:28 +09:30
Jon
f81373b832 test(itam): Device Operating System API field checks checks
ref: #248 #390 closes #362 closes #366
2024-11-28 02:22:28 +09:30
Jon
744f448423 test(itim): Device Operating System API v2 ViewSet permission checks
ref: #248 #390 #362
2024-11-28 02:22:28 +09:30
Jon
a7b0ace2ef test(itam): Device Operating System Serializer Validation checks
ref: #248 #390 #362
2024-11-28 02:22:28 +09:30
Jon
f4c06da385 feat(itam): Add device operating system API v2 endpoint
ref: #248 #390 #362
2024-11-28 02:22:28 +09:30
Jon
bd7c0a4901 test(core): remove duplicate functional slash commands
ref: #248 #390 #366
2024-11-28 02:22:28 +09:30
Jon
06fff3b2df refactor(itam): ensure device is unique for device os model
ref: #248 #390 #366
2024-11-28 02:22:28 +09:30
Jon
aebd0f3580 refactor: ensure filed organization is required
ref: #248 #390 #366
2024-11-28 02:22:28 +09:30
Jon
3afc63d8fc refactor(config_management): config_group ref to use full model name
ref: #248 #390 #366
2024-11-28 02:22:28 +09:30
Jon
5f7b6ef9eb refactor: update serializers to use model get_url function
ref: #248 #390 #366
2024-11-28 02:22:28 +09:30
Jon
581598dabf fix(core): add kwargs to notes
ref: #248 #390 #366
2024-11-28 02:22:27 +09:30
Jon
0c3c6adaea fix(core): correct get_url function notes
ref: #248 #390 #366
2024-11-28 02:22:27 +09:30
Jon
84c65419c2 fix(core): add missing dep to notes
ref: #248 #390 #366
2024-11-28 02:22:27 +09:30
Jon
7930af269d fix(access): correct team users get_url
ref: #248 #390 #366
2024-11-28 02:22:27 +09:30
Jon
c2751f9ae0 fix(access): correct team get_url requires kwargs
ref: #248 #390 #366
2024-11-28 02:22:27 +09:30
Jon
21c70225c8 fix(core): correct notes get_url
ref: #248 #390 #366
2024-11-28 02:22:27 +09:30
Jon
11fa10214c fix(access): correct team get_url
ref: #248 #390 #366
2024-11-28 02:22:27 +09:30
Jon
048956fd22 fix(core): ticket model url requires kwargs
ref: #248 #390
2024-11-28 02:22:27 +09:30
Jon
81e63cccd8 fix(core): ticket comment model url requires kwargs
ref: #248 #390
2024-11-28 02:22:27 +09:30
Jon
20f6b4f368 refactor(core): ticket comment url name updated to match model name
ref: #248 #390
2024-11-28 02:22:27 +09:30
Jon
be2699e2e0 fix(core): dont attempt to fetch org for ticket comment if no data supplied
ref: #248 #390
2024-11-28 02:22:27 +09:30
Jon
463774a718 test: model get_url function checks
ref: #248 #391 nofusscomputing/centurion_erp_ui#29 closes #366
2024-11-28 02:22:27 +09:30
Jon
05f03efc64 refactor: Add function get_url to tenancy models
ref: #248 #366 #391 nofusscomputing/centurion_erp_ui#29
2024-11-28 02:22:27 +09:30
Jon
f420bc6f6a chore: update nav icons
ref: #248 #390
2024-11-28 02:22:27 +09:30
Jon
a60cf6c288 fix(core): Always set the organization to the ticket org when adding a ticket comment when org not specified.
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:27 +09:30
Jon
10bade6633 feat(api): Add return URL to metadata if model has attribute get_url
ref: #248 #385 #388 #389 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:27 +09:30
Jon
96670857e9 fix(api): Ensure queryset filters to actual item if pk is defined
ref: #248 #385 #388 #389 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:27 +09:30
Jon
7a5c55a46e fix(core): Automagic fetch data for fields and only require ticket id to link item to ticket
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:27 +09:30
Jon
18aa58b85e fix(core): Always set the organization to the ticket org when adding a ticket comment.
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:27 +09:30
Jon
e0168640cf feat(config_management): Add field child group count to table fields for groups
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:27 +09:30
Jon
5899bb17ca fix(config_management): show parent groups only on index
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
16927fc732 feat(itam): Add page_layout to SoftwareVersion model
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
5129a8de5c fix(core): Set notes _self url to empty val then attempt to sset
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23 fixes nofusscomputing/centurion_erp_ui#24
2024-11-28 02:22:26 +09:30
Jon
1e556f1011 feat(itam): Add page_layout to OperatingSystemVersion model
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
20c09ec9ee feat(project_management): Add page_layout to Milestone model
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
279967d26c feat(settings): Add page_layout to AppSettings model
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
56dd268e20 fix(core): Ensure API v1 Ticket sets the ticket type prior to validation
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
6668c6ae35 fix(core): Dont attempt to use ticket instance organization if it's a new ticket being created
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
228e36d3cd fix(access): Ensure organization is a mandatory field
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
46441aa667 feat(access): render team_name field as anchor
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
d7c24c3910 feat(api): Support setting char field as an anchor field using .urls._self
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
2024-11-28 02:22:26 +09:30
Jon
e94e28ad33 feat(api): Added abilty to specify a css class for markdown field
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#4 nofusscomputing/centurion_erp_ui#26
2024-11-28 02:22:26 +09:30
Jon
55b123a095 fix(core): Ensure ticket and comment bodies are set to required
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#4 nofusscomputing/centurion_erp_ui#26
2024-11-28 02:22:26 +09:30
Jon
e42a009014 feat: Add timezone support
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#4 nofusscomputing/centurion_erp_ui#26
2024-11-28 02:22:26 +09:30
Jon
2b25e2bb02 refactor(api): set fields that are for markdown to use the markdown field
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#26
2024-11-28 02:22:26 +09:30
Jon
f345dd366c feat(api): Add a Common Model serializer to be inherited by all model serializers
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#26
2024-11-28 02:22:26 +09:30
Jon
c54c91f4bf feat(core): new field type markdown
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#26
2024-11-28 02:22:26 +09:30
Jon
5be205a611 feat(core): new field type char
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#26
2024-11-28 02:22:26 +09:30
Jon
696b6e7b16 feat(core): add RElated Items choices to metadata
ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#26
2024-11-28 02:22:26 +09:30
Jon
8837811c18 chore: add UI to docker-compose.yaml
ref: #248 #385
2024-11-28 02:22:26 +09:30
Jon
c4f396af2e fix(core): correct navigation metadata
ref: #248 #385
2024-11-28 02:22:26 +09:30
Jon
b258800884 test(core): move unit tests that check functionality to func test for ticket
ref: #15 #248 #385
2024-11-28 02:22:26 +09:30
Jon
98c753d0e0 chore(compose): updaate docker compose file for testing
ref: #248 #383
2024-11-28 02:22:26 +09:30
Jon
cd0bcf6731 chore(api): Correct DRF Swagger Docs errors
ref: #248 #361 #383
2024-11-28 02:22:25 +09:30
Jon
e196033821 fix(task): Ensure if inventory RX is a string, serialize it
ref: #248 #383
2024-11-28 02:22:25 +09:30
Jon
3dac12c96f refactor(task): Adjust inventory to use API v2 serializer
ref: #248 #383
2024-11-28 02:22:25 +09:30
Jon
06b936b355 test(itam): Inventory API v2 Serializer Checks
ref: #15 #248 #383
2024-11-28 02:22:25 +09:30
Jon
1c5fb0de18 feat(itam): Add Inventory API v2 endpoint
ref: #248 #383
2024-11-28 02:22:25 +09:30
Jon
5987e62063 test(core): Ensure that when ticket is assigned it's status is updated to assigned
ref: #15 #375 #383
2024-11-28 02:22:25 +09:30
Jon
ad9ed13bc4 test(settings): External Link API ViewSet permission checks
ref: #15 #248 #383
2024-11-28 02:22:25 +09:30
Jon
bfbaac0c21 test(access): External Link API v2 Serializer Checks
ref: #15 #248 #383
2024-11-28 02:22:25 +09:30
Jon
198232a43f test(functional): Move request ticket checks from unit
ref: #15 #375 #383
2024-11-28 02:22:25 +09:30
Jon
f695f14e14 test(functional): Move functional test cases to relevant functional test dir
ref: #15 #375 #382
2024-11-28 02:22:25 +09:30
Jon
506c5354cc test(access): Organization API v2 Serializer Checks, only super user can create
ref: #15 #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
3f92afef13 fix(access): Team User serializer not to capture exceptions
exceptions used to display issue to user

ref: #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
48541f117e fix(access): Team User team and user fields required when creating, don't use default value.
ref: #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
873411c875 test(access): Team User API v2 Serializer Checks
ref: #15 #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
b25bd4cb34 test(access): Team API v2 Serializer Checks
ref: #15 #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
211ead9900 fix(access): Team name required when creating, don't use default value.
ref: #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
febf2718ea fix(access): Dont capture exceptions within team serializer
exceptions are used to display the error to the user

ref: #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
e31511c93b test(access): Organization API v2 Serializer Checks
ref: #15 #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
d64d1635d8 test(project_management): Organization API v2 ViewSet permission checks
ref: #15 #248 #368 #382
2024-11-28 02:22:25 +09:30
Jon
0eb88038a4 feat(api): Depreciate API V1 endpoint /api/config
API v2 endpint is /itam/device/x on path .config or .rendered_config

ref: #248 #345 #382
2024-11-28 02:22:25 +09:30
Jon
a47da4d957 fix(core): Ensure import user can set field opened_by when importing tickets
ref: #248 #382
2024-11-28 02:22:25 +09:30
Jon
0b258b3638 test(core): Ensure test setup correctly for ticket checks
ref: #15 #248 #382
2024-11-28 02:22:25 +09:30
Jon
89b0a6b003 fix(core): Correct duration slash command regex
ref: #248 #376 #382
2024-11-28 02:22:25 +09:30
Jon
da9799cb3c test(core): Spend Slash command Checks.
ref: #15 #248 #382 closes #376
2024-11-28 02:22:25 +09:30
Jon
e28d25b137 test(core): Relate Slash command Checks.
ref: #15 #248 #376 #381
2024-11-28 02:22:25 +09:30
Jon
8fbbf124df test(core): Ensure that an item that may be linked to a ticket, when its deleted, the ticket link is removed
ref: #15 #248 #376 #381 fixes #336
2024-11-28 02:22:25 +09:30
Jon
c415d53708 fix(core): When an item that may be linked to a ticket is deleted, remove the ticket link
ref: #15 #248 #336 #376 #381
2024-11-28 02:22:25 +09:30
Jon
86d4f7684f feat(core): New signal for cleaning linked ticket items when the item is deleted
ref: #15 #248 #336 #376 #381
2024-11-28 02:22:24 +09:30
Jon
e89dff1c2f test(core): Ensure a non-existing item cant be Linked to a Ticket.
ref: #15 #248 #336 #376 #381
2024-11-28 02:22:24 +09:30
Jon
5ef5103ea9 test(core): Action command Related Item Ticket Slash command checks.
ref: #15 #248
2024-11-28 02:22:24 +09:30
Jon
5dabf00980 test(core): Blocked by Slash command Checks.
ref: #15 #248 #376 #381
2024-11-28 02:22:24 +09:30
Jon
ce170ff9aa test(core): Blocks Slash command Checks.
ref: #15 #248 #376 #381
2024-11-28 02:22:24 +09:30
Jon
df73e86c88 fix(core): Related ticket slash command requires model to be imported
ref: #248 #376 #381
2024-11-28 02:22:24 +09:30
Jon
72fe8b8422 test(core): Related Item Ticket Slash command checks.
ref: #15 #248 #376 #381
2024-11-28 02:22:24 +09:30
Jon
7a4edc69ba test(project_management): Project Task API v2 Serializer Checks
ref: #15 #248 #378 closes #368
2024-11-28 02:22:24 +09:30
Jon
5e6d675cb9 test(itim): Incident Ticket API v2 Serializer Checks
ref: #15 #248 #368 #378
2024-11-28 02:22:24 +09:30
Jon
80575e02c7 test(itim): Problem Ticket API v2 Serializer Checks
ref: #15 #248 #368 #378
2024-11-28 02:22:24 +09:30
Jon
84dafcae87 test(itim): Change Ticket API v2 Serializer Checks
ref: #15 #248 #368 #378
2024-11-28 02:22:24 +09:30
Jon
ed87241763 test(core): Request Ticket API v2 Serializer Checks
ref: #15 #248 #368 #378
2024-11-28 02:22:24 +09:30
Jon
18db1f58ff test(core): Common Ticket Test Cases for API v2 serializers
ref: #15 #248 #368 #378
2024-11-28 02:22:24 +09:30
Jon
552bce4d47 fix(core): correct missing or incomplete ticket model fields
ref: #248 #378
2024-11-28 02:22:24 +09:30
Jon
3bb7978d15 fix(core): When creating a ticket, by default give it a status of new
ref: #248 #378
2024-11-28 02:22:24 +09:30
Jon
e771631a04 fix(core): Ensure that when creating a ticket an organization is specified
ref: #248 #378
2024-11-28 02:22:24 +09:30
Jon
5821c5b33b fix(core): Correct Ticket read-only fields
ref: #248 #378
2024-11-28 02:22:24 +09:30
Jon
b1a42e01bf fix(core): Correct inheritence order for ticket serializers
ref: #248 #378
2024-11-28 02:22:24 +09:30
Jon
1b286d0873 test(project_management): Project Task API field checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
85a9cf17cd test(itim): Problem Ticket API field checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
3ef7d175c1 test(itim): Incident Ticket API field checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
67fa708edf test(itim): Change Ticket API field checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
b53f4aa770 test(assistance): Update request field checks to cater for project and milestone as dicts
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
bf1e211c22 feat(core): Show milestone using base serializer for all ticket types
ref: #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
39a2f4c303 feat(core): Show project using base serializer for all ticket types
ref: #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
8c782b19ce test(project_management): Ensure ticket assigned project for all API v2 ViewSet permission checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
ec3ab3e055 test(project_management): PRoject_task API v2 ViewSet permission checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
525e826857 test(itim): Problem Ticket API v2 ViewSet permission checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
e8629b2e1c test(itim): Incident Ticket API v2 ViewSet permission checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
fe56fab6fd test(itim): Change Ticket API v2 ViewSet permission checks
ref: #15 #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
66d7d513ae fix(core): Ensure Organization can be set when creating a ticket
ref: #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
a00cc52ff0 fix(core): Ensure that when fetching ticket permission, spaces are replaced with '_'
ref: #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
13ab073f99 fix(core): Ticket serializer org validator to access correct data
ref: #248 #368 #377
2024-11-28 02:22:24 +09:30
Jon
a2cac47414 feat(core): Add Parse error to exceptions
ref: #248 #368 #377
2024-11-28 02:22:23 +09:30
Jon
f522e6f9c1 feat(core): Ticket serializer to ensure user who opens ticket is subscribed to it
ref: #248 #368 #377
2024-11-28 02:22:23 +09:30
Jon
11ce8cc864 feat(core): Ticket serializer to validate milestone
ref: #248 #368 #377
2024-11-28 02:22:23 +09:30
Jon
352b34294c feat(core): Ticket serializer to validate organization
ref: #248 #368 #377
2024-11-28 02:22:23 +09:30
Jon
6428e96c09 fix(core): Add project URL to all Ticket Types
ref: #248 #377
2024-11-28 02:22:23 +09:30
Jon
9908253a7e fix(core): Add Ticket Category URL to all Ticket Types
ref: #248 #377
2024-11-28 02:22:23 +09:30
Jon
74c6ee24cf fix(core): When obtaining ticket type use it's enum value
ref: #248 #377
2024-11-28 02:22:23 +09:30
Jon
74d55fb81e feat(itim): Add Project Task API v2 endpoint
ref: #248 #377
2024-11-28 02:22:23 +09:30
Jon
7fc5138fcd feat(itim): Add Problem Ticket API v2 endpoint
ref: #248 #377
2024-11-28 02:22:23 +09:30
Jon
73d7338e7a feat(itim): Add Incident Ticket API v2 endpoint
ref: #248 #377
2024-11-28 02:22:23 +09:30
Jon
189b81106d feat(itim): Add Change Ticket API v2 endpoint
ref: #248 #377
2024-11-28 02:22:23 +09:30
Jon
223e78ae07 docs(views): update to denote dynamic permissions
ref: #248 #345 #374
2024-11-28 02:22:22 +09:30
Jon
d20a1460da feat(api): Depreciate v1 API Endpoint Assistance
ref: #248 #345 #374
2024-11-28 02:22:22 +09:30
Jon
429f3a9a94 docs(views): update to denote dynamic permissions
ref: #248 #345 #374
2024-11-28 02:22:22 +09:30
Jon
a04cfeef86 feat(api): Depreciate v1 API Endpoint Request Ticket
ref: #248 #345 #374
2024-11-28 02:22:22 +09:30
Jon
8cd442ea25 feat(api): Depreciate v1 API Endpoint Assistance
ref: #248 #345 #374
2024-11-28 02:22:22 +09:30
Jon
8e21cb5a85 feat(api): Depreciate v1 API Endpoint Ticket Comments
ref: #248 #345 #374
2024-11-28 02:22:22 +09:30
Jon
91e38a80f7 feat(api): Depreciate v1 API Endpoint Ticket Comment Categories
ref: #248 #345 #374
2024-11-28 02:22:22 +09:30
Jon
df55cf0450 feat(api): Depreciate v1 API Endpoint Ticket Categories
ref: #248 #345 #374
2024-11-28 02:22:22 +09:30
Jon
dac01ace32 refactor(core): Move ticket validation from is_valid -> validate method
ref: #248 #368 #374
2024-11-28 02:22:22 +09:30
Jon
e39ec70236 fix(core): Ensure triage and import permissions are catered for Tickets
ref: #248 #368 #374
2024-11-28 02:22:22 +09:30
Jon
4acfe5f313 test(core): fix broken tests from 8b701785b3 changes
ref: #15 #248 #368 #374
2024-11-28 02:22:22 +09:30
Jon
7d3a4c7c63 test(core): Item Ticket API v2 Serializer checks
ref: #15 #248 #368 #374
2024-11-28 02:22:22 +09:30
Jon
08e13a728a test(core): Item Linked Ticket API v2 ViewSet permission checks
ref: #15 #248 #368 #374
2024-11-28 02:22:22 +09:30
Jon
f27e0379c2 refactor(core): Ensure Ticket Linked Serializer works for Item Tickets
ref: #248 #368 #374
2024-11-28 02:22:22 +09:30
Jon
effa2904f8 fix(core): Ensure Ticket Linked Item slash command works for ticket comments
ref: #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
9fe4883f91 refactor(core): Ticket Linked Item slash command to use serializer
ref: #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
e61b883c14 fix(core): Only use Import Serializer on Ticket Comment Create if user has perms
ref: #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
04ae338864 refactor(core): Related ticket slash command to use serializer
ref: #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
bf56b271d7 feat(core): Ensure Related Tickets validate against duplicate entries
ref: #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
daa8dbe04b feat(core): Add MethodNot Allowed to Centurion exceptions
ref: #15 #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
7d62d6b1c7 test(core): Related Ticket API v2 Serializer checks
ref: #15 #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
f45019024b fix(core): Ensure related ticket slash command works for ticket comments
ref: #15 #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
2c934d4eaf fix(api): Ensure METHOD_NOT_ALLOWED exception is thrown
ref: #15 #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
0965f56719 test(core): Related Ticket API v2 ViewSet permission checks
ref: #15 #248 #368 #374
2024-11-28 02:22:21 +09:30
Jon
80b8cdb356 test(core): Ticket Comment API v2 Serializer checks
ref: #15 #248 #373
2024-11-28 02:22:21 +09:30
Jon
8479f8c30b feat(core): Determine serializer from action and user permissions for Ticket Comments
ref: #248 #373
2024-11-28 02:22:21 +09:30
Jon
821ba0edbf feat(core): Add custom exception class
ref: #248 #373
2024-11-28 02:22:21 +09:30
Jon
a75a56eb96 feat(core): Ensure ticket comment Serializer validates for existance of comment_type and ticket id
ref: #248 #373
2024-11-28 02:22:21 +09:30
Jon
fe5aac0218 feat(core): Ensure ticket comment Serializer is picked based off of comment_type
ref: #248 #373
2024-11-28 02:22:21 +09:30
Jon
32e3a97b09 test(core): Ticket Linked Item API v2 Serializer checks
ref: #15 #248 #373
2024-11-28 02:22:21 +09:30
Jon
7b70fd30b3 feat(core): Ensure that ticket linked item validates if ticket supplied
ref: #15 #248 #373
2024-11-28 02:22:21 +09:30
Jon
14776a0334 feat(core): Ensure that ticket comment category cant assign self as parent
ref: #15 #248 #373
2024-11-28 02:22:21 +09:30
Jon
0404b52924 test(core): Ticket Comment Category API v2 Serializer checks
ref: #15 #248 #373
2024-11-28 02:22:21 +09:30
Jon
fdd50c3208 feat(core): Ensure that ticket category cant assign self as parent
ref: #15 #248 #373
2024-11-28 02:22:21 +09:30
Jon
4c927efeef test(core): Ticket Category API v2 Serializer checks
ref: #15 #248 #373
2024-11-28 02:22:20 +09:30
Jon
6b6b70d653 test(itim): Ticket Linked Item API field checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
863b2d46c6 fix(core): Correct serializer item field to be for view serializer ONLY
ref: #248 #365
2024-11-28 02:22:20 +09:30
Jon
b972ea1f97 test(itim): Service Ticket URL API field checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
e220303d06 test(itim): Cluster Ticket URL API field checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
0b37f8f2b3 test(itam): Software Ticket URL API field checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
da414d741f test(itam): Operating System Ticket URL API field checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
f1332cecf4 test(itam): Device Ticket URL API field checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
31af109742 test(config_management): Group Ticket URL API field checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
d4aa3e673f fix(config_management): Correct ticket url in group serializer
ref: #248 #365
2024-11-28 02:22:20 +09:30
Jon
fffe78a4ed fix(core): Add missing ticket comment category url
ref: #248 #365
2024-11-28 02:22:20 +09:30
Jon
95f9a2620f test(core): Ticket Comment API v2 ViewSet permission checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
7869ff4478 test(core): Ticket Comment Category API v2 ViewSet permission checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
c06d09f507 test(core): Ticket Category API v2 ViewSet permission checks
ref: #15 #248 #365
2024-11-28 02:22:20 +09:30
Jon
846eb79c6e test(assistance): Request Ticket API v2 ViewSet permission checks
ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
28805ed727 test(core): Ticket Common API v2 ViewSet permission checks
Test cases common to ALL ticket types

ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
858217d2a2 test(core): Ticket Comment Category API field checks
ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
848c342397 feat(core): Add Ticket Comment Category API v2 endpoint
ref: #248 #365
2024-11-28 02:22:19 +09:30
Jon
71ad05e051 test(core): Related Tickets API field checks
ref: #15 #248 #365 #367
2024-11-28 02:22:19 +09:30
Jon
5cb329c282 test(itim): Service Linked Tickets API field checks
ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
0ba1a34ee7 test(itim): Cluster Linked Tickets API field checks
ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
68ee0b3701 test(itam): Software Linked Tickets API field checks
ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
873f8e16f2 test(itam): Operating System Linked Tickets API field checks
ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
5381b96ad0 test(itam): device Linked Tickets API field checks
ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
76320251a1 test(core): Config Group Linked Tickets API field checks
ref: #15 #248 #365
2024-11-28 02:22:19 +09:30
Jon
805cc888a5 test(core): Linked Ticket Common API field checks
test cases common to ALL linked tickets

ref: #15 #248 #365
2024-11-28 02:22:18 +09:30
Jon
5589b67e24 test(core): Ticket Linked Items API field checks
ref: #15 #248 #365
2024-11-28 02:22:18 +09:30
Jon
e0baa57735 test(core): Ticket Comment API field checks
ref: #15 #248 #365
2024-11-28 02:22:18 +09:30
Jon
dd8cbc9da4 refactor(core): Ticket Comments to use a single API Endpoint
ref: #248 #365
2024-11-28 02:22:18 +09:30
Jon
811e723006 test(core): Ticket Category API field checks
ref: #15 #248 #365
2024-11-28 02:22:18 +09:30
Jon
10703067fa test(assistance): Request Ticket API field checks
ref: #15 #248 #360
2024-11-28 02:22:18 +09:30
Jon
38e1742f15 test(core): Ticket Common API field checks
test cases common to ALL ticket types

ref: #15 #248 #360
2024-11-28 02:22:18 +09:30
Jon
487cbd8e54 fix(core): Add missing permissions function to ticket viewset
ref: #248 #365
2024-11-28 02:22:18 +09:30
Jon
b5bc45fa2b fix(core): Ensure that when checking linked ticket class name, spaces are replaced
ref: #248 #365
2024-11-28 02:22:18 +09:30
Jon
a4e62b3718 fix(core): Ensure item tickets class can have underscore in name
ref: #248 #365
2024-11-28 02:22:18 +09:30
Jon
564bae99b1 feat(core): Add Item Ticket API v2 endpoint
added for cluster, config group, device, service, software and operating system.

ref: #248 #365
2024-11-28 02:22:18 +09:30
Jon
c36d36be0b feat(core): Add Related Ticket API v2 endpoint
ref: #248 #365
2024-11-28 02:22:17 +09:30
Jon
da5d19cbcb fix: Dont attempt to access request within serializers when no context is present
ref: #248 #365 #366
2024-11-28 02:22:17 +09:30
Jon
db8a815dc0 feat(core): Add Ticket Linked Item API v2 endpoint
ref: #248 #365
2024-11-28 02:22:17 +09:30
Jon
0b00193bed feat(core): Add url function to Ticket Linked Items model
ref: #248 #365 #366
2024-11-28 02:22:17 +09:30
Jon
8f13047a1f feat(itim): Add url function to Service model
ref: #248 #365 #366
2024-11-28 02:22:17 +09:30
Jon
faa368331c feat(itim): Add url function to Cluster model
ref: #248 #365 #366
2024-11-28 02:22:17 +09:30
Jon
0eef42b3e6 feat(itam): Add url function to Software model
ref: #248 #365 #366
2024-11-28 02:22:17 +09:30
Jon
e6a5e446ab feat(itam): Add url function to Operating System model
ref: #248 #365 #366
2024-11-28 02:22:17 +09:30
Jon
43f90251b0 feat(itam): Add url function to Device model
ref: #248 #365 #366
2024-11-28 02:22:17 +09:30
Jon
d57d4ad96a feat(config_management): Add url function to Config Groups model
ref: #248 #365 #366
2024-11-28 02:22:17 +09:30
Jon
4542301446 feat(core): Add Ticket Comment API v2 endpoint
ref: #248 #365
2024-11-28 02:22:17 +09:30
Jon
a4bfb3a7e8 fix(core): Add Ticket Category API v2 endpoint to urls
ref: #248 #365
2024-11-28 02:22:17 +09:30
Jon
34a9d202c3 fix(core): Correct ticket comment model name
ref: #248 #365
2024-11-28 02:22:17 +09:30
Jon
f5eb4c25b2 feat(core): Add Ticket Category API v2 endpoint
ref: #248 #365
2024-11-28 02:22:17 +09:30
Jon
0612c2350d fix(api): Ensure read-only fields have choices added to metadata
ref: #248 #365
2024-11-28 02:22:16 +09:30
Jon
726a3ac406 fix(api): Correct inheritance order for ModelViewSet
ref: #248 #365
2024-11-28 02:22:16 +09:30
Jon
d8e6437241 feat(assistance): Add Request Ticket API v2 endpoint
ref: #248 #365
2024-11-28 02:22:16 +09:30
Jon
5fe2269e98 feat(api): Custom exception UnknownTicketType
for use when attempting to detect ticket type

ref: #248 #365
2024-11-28 02:22:16 +09:30
Jon
68c22966bc feat(core): Add Base Ticket Serializer and ViewSet
ref: #248 #365
2024-11-28 02:22:16 +09:30
Jon
d137ea663a docs(api): Add filter and remove footer schemas from swagger ui
ref: #248 #265
2024-11-28 02:22:16 +09:30
Jon
268e3294a2 feat(api): Setup API to be correctly versioned
ref: #248 #365
2024-11-28 02:22:16 +09:30
Jon
cdacd70bf1 test(settings): Celery Log API v2 ViewSet permission checks
ref: #15 #248 #360
2024-11-28 02:22:16 +09:30
Jon
4412ff14e7 test(settings): Celery Log API field checks
ref: #15 #248 #360
2024-11-28 02:22:16 +09:30
Jon
50edfd5997 test(settings): User Settings API v2 ViewSet permission checks
ref: #15 #248 #360
2024-11-28 02:22:16 +09:30
Jon
9137758294 test(settings): User Settings API field checks
ref: #15 #248 #360
2024-11-28 02:22:16 +09:30
Jon
94045d136f test(settings): App Settings API v2 ViewSet permission checks
ref: #15 #248 #360
2024-11-28 02:22:16 +09:30
Jon
768fd8d640 test(settings): App Settings API field checks
ref: #15 #248 #360
2024-11-28 02:22:16 +09:30
Jon
926349e04e feat(settings): Add get_organization function to app settings model
ref: #248 #360
2024-11-28 02:22:16 +09:30
Jon
ec16910ec6 feat(settings): Add Celery Task Logs API v2 endpoint
ref: #248 #360
2024-11-28 02:22:16 +09:30
Jon
20dc72d564 feat(api): Added ability to specify table fields within the viewset.
required for models that are external to centurion

ref: #248 #360
2024-11-28 02:22:16 +09:30
Jon
00c2826d9a feat(settings): Add User Settings API v2 endpoint
ref: #248 #360
2024-11-28 02:22:15 +09:30
Jon
2077becc89 fix(settings): Populate user_settings Meta
ref: #248 #360
2024-11-28 02:22:15 +09:30
Jon
86008e9cbd feat(settings): Add App Settings API v2 endpoint
ref: #248 #360
2024-11-28 02:22:15 +09:30
Jon
fb0905c44a fix(settings): Populate app_settings Meta
ref: #248 #360
2024-11-28 02:22:15 +09:30
Jon
4336d90dc0 chore(settings): remove extra fields declaration from external_links
ref: #248 #360
2024-11-28 02:22:15 +09:30
Jon
7322667a99 fix(project_management): For Project use a separate Import Serializer
ref: #248 #357
2024-11-28 02:22:15 +09:30
Jon
6cb99609cd fix(project_management): use the post data dict for fetching edit organisation
ref: #248 #357
2024-11-28 02:22:15 +09:30
Jon
bad610be36 test(project_management): Project API v2 ViewSet permission checks for import user
ref: #15 #248 #357
2024-11-28 02:22:15 +09:30
Jon
f53c6d0f6d test(project_management): Project Serializer Validation clean up
ref: #15 #248 #357
2024-11-28 02:22:15 +09:30
Jon
5fd3123c9b fix(project_management): use the post data or existing object for fetching edit organisation
ref: #248 #357
2024-11-28 02:22:15 +09:30
Jon
fa3698aa2b fix(project_management): Dont use init to adjust read_only_fields for project
ref: #248 #357
2024-11-28 02:22:15 +09:30
Jon
82a06e57b1 test(project_management): Project Type API v2 ViewSet permission checks
ref: #15 #248 #357
2024-11-28 02:22:15 +09:30
Jon
a09fb4c8cd test(project_management): Project Type Serializer Validation checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
91444172aa test(project_management): Project Type API field checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
745983dfab test(project_management): Project State API v2 ViewSet permission checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
58216073d7 test(project_management): Project state Serializer Validation checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
7263b3a8a3 test(project_management): Project state API field checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
8cc3adf3c2 test(project_management): Project Milestone API v2 ViewSet permission checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
dff794c433 test(project_management): Project milestone Serializer Validation checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
c89a8e8007 test(project_management): add trace output to Project serializer
tests are passing locally and not on GH actions

ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
89588211fd test(project_management): Project Milestone API field checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
ab41c96182 test(project_management): Project API v2 ViewSet permission checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
9327c6b377 test(project_management): Project Serializer Validation checks
ref: #15 #248 #357
2024-11-28 02:22:14 +09:30
Jon
036dbdeba3 fix(project_management): if user not hav org specified dont attempt to access
ref: #358
2024-11-28 02:22:13 +09:30
Jon
b1b127b9f4 test(project_management): Project API field checks
ref: #15 #248 #357
2024-11-28 02:22:13 +09:30
Jon
77e09e8a13 feat(project_management): Add remaining Project base serializers for API v2
ref: #248 #357
2024-11-28 02:22:13 +09:30
Jon
663f496dc7 feat(project_management): Project Validation for API v2
ref: #248 #357
2024-11-28 02:22:13 +09:30
Jon
85a4158413 fix(project_management): for project serializer (api v1) ensure org is id
ref: #248 #357
2024-11-28 02:22:13 +09:30
Jon
ce566a8928 feat(project_management): Add Project Type API v2 endpoint
ref: #248 #357
2024-11-28 02:22:13 +09:30
Jon
9ecd545d1f feat(project_management): Add Project State API v2 endpoint
ref: #248 #357
2024-11-28 02:22:13 +09:30
Jon
11e3b04b46 feat(project_management): Add Project Milestone API v2 endpoint
ref: #248 #357
2024-11-28 02:22:13 +09:30
Jon
a708644809 feat(project_management): Add Project API v2 endpoint
ref: #248 #357
2024-11-28 02:22:13 +09:30
Jon
e524d4d43d test(itim): Port API v2 ViewSet permission checks
ref: #15 #248 #356
2024-11-28 02:22:13 +09:30
Jon
48b5754dcf feat(itim): Port Serializer Validations
ref: #15 #248 #356
2024-11-28 02:22:13 +09:30
Jon
814c4b2beb test(itim): Port API field checks
ref: #15 #248 #356
2024-11-28 02:22:13 +09:30
Jon
2dbee2a058 test(itim): Service API v2 ViewSet permission checks
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
ed34ed34cb feat(itim): Service Serializer Validations
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
5fe2b9e646 test(itim): Service Serializer Validation checks
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
a230edf25a fix(itim): Ensure service config from template is not gathered if not defined
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
a7c9ff4cee test(itim): Service API field checks
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
6e34e33c00 test(itim): Cluster Type API v2 ViewSet permission checks
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
a92bfd427f test(itim): Cluster Type Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:12 +09:30
Jon
0803b2c766 test(itam): Cluster Type API field checks
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
800b5d87cf test(itim): Cluster API ViewSet permission checks
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
bfe3f10535 test(itim): Cluster Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:12 +09:30
Jon
176f1c1073 fix(itim): Ensure params passed to super when validating cluster
ref: #248 #356
2024-11-28 02:22:12 +09:30
Jon
8f68345bb3 test(itam): Cluster API field checks
ref: #15 #248 #356
2024-11-28 02:22:12 +09:30
Jon
fe1816156a feat(itim): Ensure cluster cant assign itself as parent on api v2 endpoint
ref: #248 #356
2024-11-28 02:22:12 +09:30
Jon
d945092153 fix(itim): Correct Device Service API v2 endpoint
ref: #248 #356
2024-11-28 02:22:11 +09:30
Jon
cf31f198c8 test(itam): remove Device Ticket API field checks
tickets api endpooint not yet available

ref: #15 #248 #356
2024-11-28 02:22:11 +09:30
Jon
b4f3f0ec48 test(itam): Device Service API field checks
ref: #15 #248 #356
2024-11-28 02:22:11 +09:30
Jon
cfedd4b74e feat(itim): Add Port API v2 endpoint
ref: #248 #356
2024-11-28 02:22:11 +09:30
Jon
06362f226c feat(itim): Add Cluster API v2 endpoint
ref: #248 #356
2024-11-28 02:22:11 +09:30
Jon
02822cc70d feat(itim): Add Cluster Type API v2 endpoint
ref: #248 #356
2024-11-28 02:22:11 +09:30
Jon
f1c5ebca71 feat(itim): Add Service API v2 endpoint
ref: #248 #356
2024-11-28 02:22:11 +09:30
Jon
e180c3aa54 feat(itam): Depreciate API v1 Software Endpoint
ref: #248 #354
2024-11-28 02:22:11 +09:30
Jon
e504393c09 test(itam): Device Software API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:11 +09:30
Jon
d6eebc1cab test(itam): Device Software Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:11 +09:30
Jon
5a7dc5afd1 test(itam): Device Software API field checks
ref: #15 #248 #354
2024-11-28 02:22:11 +09:30
Jon
613b904648 fix(itam): Don't attempt to include manufacturer in name for Device Model if not defined
ref: #248 #354
2024-11-28 02:22:11 +09:30
Jon
ae7355ba35 test(itam): Device Model API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:10 +09:30
Jon
f44b97248f test(itam): Device Model Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:10 +09:30
Jon
7d73de2264 test(itam): Device Model API field checks
ref: #15 #248 #354
2024-11-28 02:22:10 +09:30
Jon
6ba172e2dc test(itam): Device Type API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:10 +09:30
Jon
1f9c665d96 fix(itam): Ensure software version model has page_layout field
ref: #15 #248 #353
2024-11-28 02:22:10 +09:30
Jon
39bc70558a test(itam): Device Type Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:10 +09:30
Jon
fbbd809ef5 test(itam): Device Type API field checks
ref: #15 #248 #354
2024-11-28 02:22:10 +09:30
Jon
01ecc68384 test(itam): Software Version Tenancy Model Checks
ref: #15 #248 #354
2024-11-28 02:22:10 +09:30
Jon
523c82d72f test(itam): Software Version API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:10 +09:30
Jon
4f66af4bbb test(itam): Software Version Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:10 +09:30
Jon
2908f6bd4c test(itam): Software Version API field checks
ref: #15 #248 #354
2024-11-28 02:22:10 +09:30
Jon
35e547268b test(itam): Software Category Version API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:10 +09:30
Jon
ef5dd3dc21 test(itam): Software Category Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:10 +09:30
Jon
65926210b2 test(itam): Software Category Version API field checks
ref: #15 #248 #354
2024-11-28 02:22:09 +09:30
Jon
cd78a6b12f test(itam): Operating System Version API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:09 +09:30
Jon
8b155eb895 test(itam): Operating System Version Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:09 +09:30
Jon
92825d3b34 test(itam): Operating System Version API field checks
ref: #15 #248 #354
2024-11-28 02:22:09 +09:30
Jon
794fb6a733 test(itam): Software API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:09 +09:30
Jon
23bcdce938 test(itam): Software Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:09 +09:30
Jon
7bd50c6805 test(itam): Software API field checks
ref: #15 #248 #354
2024-11-28 02:22:09 +09:30
Jon
911ba67459 test(itam): Operating System Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:09 +09:30
Jon
85cde78203 test(itam): Operating_system API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:09 +09:30
Jon
efa805816f test(itam): Operating System API field checks
ref: #15 #248 #354
2024-11-28 02:22:09 +09:30
Jon
cb73866cdc test(itam): Device API field checks
ref: #15 #248 #354
2024-11-28 02:22:09 +09:30
Jon
b7bbf02dff test(itam): Device Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:09 +09:30
Jon
9e83ec9adb test(core): Device API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:08 +09:30
Jon
0314684064 feat(core): Add Operating System Version API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
5ac063d8c9 feat(core): Add Operating System API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
873dc71c08 test: enure correct type checks for url
ref: #15 #248 #354
2024-11-28 02:22:08 +09:30
Jon
09b2ea378b feat(core): Add External Link API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
538265f526 feat(itam): Add Device Software API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
4dc0f31e69 feat(itam): Add Device API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
1daa0ca219 feat(itam): Add Device Type API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
318d342d2b feat(itam): Add Software Version API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
947112ba39 feat(itam): Depreciate API v1 device endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
e54d7cfeb2 feat(itam): Add Software API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
bcb0ce42df feat(itam): Add Device Model API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
f0b14cfa66 feat(itam): Add Device API v2 endpoint
ref: #248 #355
2024-11-28 02:22:08 +09:30
Jon
d1c66318b2 test(core): Manufacturer API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:07 +09:30
Jon
5f4a09da25 test(core): Manufacturer Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:07 +09:30
Jon
32ac01dc55 test(assistance): Manufacturer API field checks
ref: #15 #248 #354
2024-11-28 02:22:07 +09:30
Jon
9884312d47 feat(itim): Add Service Notes API v2 endpoint
ref: #248 #354
2024-11-28 02:22:07 +09:30
Jon
3f41fc19d2 feat(core): Add Software Notes API v2 endpoint
ref: #248 #354
2024-11-28 02:22:07 +09:30
Jon
5d953771d7 feat(core): Add Manufacturer API v2 endpoint
ref: #248 #354
2024-11-28 02:22:07 +09:30
Jon
94119b1f9f fix(core): notes field must be mandatory
ref: #354
2024-11-28 02:22:07 +09:30
Jon
4841a36968 test(assistance): Notes API field checks
ref: #15 #49 #248 #354
2024-11-28 02:22:07 +09:30
Jon
319eaadbc2 test(core): Notes Serializer Validation checks
ref: #15 #49 #248 #354
2024-11-28 02:22:07 +09:30
Jon
df5a185986 test(itim): Service Note API ViewSet permission checks
ref: #15 #49 #248 #354
2024-11-28 02:22:07 +09:30
Jon
3e210ed217 test(itam): Softwaare Note API ViewSet permission checks
ref: #15 #49 #248 #354
2024-11-28 02:22:07 +09:30
Jon
0ce5b0d98c test(itam): Operating System Note API ViewSet permission checks
ref: #15 #49 #248 #354
2024-11-28 02:22:06 +09:30
Jon
a0b013d44e test(config_management): Device Note API ViewSet permission checks
ref: #15 #49 #248 #354
2024-11-28 02:22:06 +09:30
Jon
9f81c49119 test: Adjust tests to cater for action choices now being an integer
ref: #15 #46 #248 #354
2024-11-28 02:22:06 +09:30
Jon
2363064b1a feat(itim): Add Service base serializer
ref: #248 #354
2024-11-28 02:22:06 +09:30
Jon
419725f13f feat(itam): Add operating system Base Serializer
ref: #248 #354
2024-11-28 02:22:06 +09:30
Jon
4a2ad114d7 test(config_management): Config Groups Note API ViewSet permission checks
ref: #15 #49 #248 #354
2024-11-28 02:22:06 +09:30
Jon
c7d4f2b496 feat(config_management): Add Notes API v2 endpoint
ref: #248 #354
2024-11-28 02:22:06 +09:30
Jon
e8279dd363 refactor(core): Adjust action choices to be integer
ref: #248 #354
2024-11-28 02:22:06 +09:30
Jon
0ed6133698 test(config_management): History API ViewSet permission checks
ref: #15 #248 #354
2024-11-28 02:22:06 +09:30
Jon
2dd01111d9 feat(config_management): Add History API v2 endpoint
ref: #248 #354
2024-11-28 02:22:06 +09:30
Jon
40f110e7e5 fix(core): Add missing attributes name to history model
ref: #248 #354
2024-11-28 02:22:06 +09:30
Jon
b9b2142cc1 fix(config_management): ensure validation uses software.id for config group software serializer
ref: #248 #353
2024-11-28 02:22:06 +09:30
Jon
71f746dba6 feat(config_management): Depreciate API v1 config endpoint
ref: #248 #353
2024-11-28 02:22:06 +09:30
Jon
f019791fa4 test(config_management): Config Groups Software API ViewSet permission checks
ref: #15 #248 #353
2024-11-28 02:22:05 +09:30
Jon
99313d7a8d feat(config_management): Add config groups to config api endpoint
ref: #248 #353
2024-11-28 02:22:05 +09:30
Jon
114272471e test(config_management): Config Groups Software Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:05 +09:30
Jon
7d3576a879 feat(config_management): Add Device Base Serializer
ref: #248 #353
2024-11-28 02:22:05 +09:30
Jon
5ab7ce05bc feat(itam): Add Software Version Base Serializer
ref: #248 #348
2024-11-28 02:22:05 +09:30
Jon
99550e7ab3 feat(itam): Add Software Base Serializer
ref: #248 #348
2024-11-28 02:22:05 +09:30
Jon
bd11d82107 test(config_management): Config Groups Software Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:05 +09:30
Jon
3482b7dd0a feat(config_management): Add Config Group Software API v2 endpoint
ref: #248 #348
2024-11-28 02:22:05 +09:30
Jon
cb6f15b933 refactor(config_management): Adjust rendered config str -> dict
ref: #248 #353
2024-11-28 02:22:05 +09:30
Jon
976a5f0706 refactor(itam): Software Action field changed char -> integer
ref: #248 #353
2024-11-28 02:22:05 +09:30
Jon
7d35db030c refactor(itam): rename dir viewset -> viewsets
ref: #248 #353
2024-11-28 02:22:05 +09:30
Jon
0c9a9f5ae1 refactor(config_management): move config_group_hosts to related table
ref: #353
2024-11-28 02:22:05 +09:30
Jon
8219bf6c9d chore(vscode): add debug for migrations
ref: #353
2024-11-28 02:22:04 +09:30
Jon
a0ac0e4839 refactor: update model fields
ref: #353
2024-11-28 02:22:04 +09:30
Jon
fae48f2c5a fix(config_management): Config Groups Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:04 +09:30
Jon
518142492f test(config_management): Config Groups Serializer Validation checks
ref: #15 #248 #353
2024-11-28 02:22:04 +09:30
Jon
cc6770278f test(config_management): Config Groups API ViewSet permission checks
ref: #15 #248 #353
2024-11-28 02:22:04 +09:30
Jon
8b091e3c79 test(assistance): Config Group API field checks
ref: #15 #248 #353
2024-11-28 02:22:04 +09:30
Jon
10704457b0 feat(config_management): Add Config Group API v2 endpoint
ref: #248 #348
2024-11-28 02:22:04 +09:30
Jon
5b9ed1db2c refactor(config_management): update serializer dir name
ref: #248
2024-11-28 02:22:04 +09:30
Jon
47d5e40315 feat(assistance): Ensure Knowledge Base Category cant assign self as parent category
ref: #15 #248 #352
2024-11-28 02:22:04 +09:30
Jon
9278668e58 test(assistance): Knowledge Base Category Serializer Validation checks
ref: #15 #248 #352
2024-11-28 02:22:04 +09:30
Jon
56235e6ffe fix(assistance): Correct Knowledge Base Category serializer Validation
ref: #248 #348
2024-11-28 02:22:04 +09:30
Jon
ed6cf305ae test(assistance): ensure is_valid raises exceptions for Knowledge Base Serializer Validation checks
ref: #15 #248 #352
2024-11-28 02:22:04 +09:30
Jon
df213c2015 feat(assistance): Knowledge Base Serializer Validation method added
ref: #248 #352
2024-11-28 02:22:03 +09:30
Jon
ea4952bd3e fix(itam): Correct inventory validation response data
ref: #352
2024-11-28 02:22:03 +09:30
Jon
138f8237fe test(assistance): Knowledge Base Serializer Validation checks
ref: #15 #248 #352
2024-11-28 02:22:03 +09:30
Jon
a4369c4a00 fix(itam): Correct inventory api upload to use API exceptions instead of django base
ref: #352
2024-11-28 02:22:03 +09:30
Jon
42e38e26d9 fix(assistance): Add missing fields display_name and model_notes to Knowledge Base Category serializer
ref: #248 #352
2024-11-28 02:22:03 +09:30
Jon
073330015c test(assistance): Knowledge Base Category API field checks
ref: #15 #248 #352
2024-11-28 02:22:03 +09:30
Jon
80e981d40f test(assistance): Knowledge Base API field checks
ref: #15 #248 #352
2024-11-28 02:22:03 +09:30
Jon
6d58f33a67 refactor(access): add name to modified field
ref: #352
2024-11-28 02:22:03 +09:30
Jon
a87b313fdf fix(assistance): correct KB category serializer validation
ref: #15 #248 #352
2024-11-28 02:22:03 +09:30
Jon
8b31a96508 test(access): correct organization permission checks to have HTTP/403 not HTTP/405
ref: #15 #248 #352
2024-11-28 02:22:03 +09:30
Jon
a32fe28a0d test(assistance): Knowledge Base Category API ViewSet permission checks
ref: #15 #248 #352
2024-11-28 02:22:03 +09:30
Jon
308b5168d8 test(assistance): Knowledge Base API ViewSet permission checks
ref: #15 #248 #352
2024-11-28 02:22:03 +09:30
Jon
62ca58e820 refactor(api): Adjust viewset common so that page_layout is available for base
ref: #248 #348
2024-11-28 02:22:02 +09:30
Jon
94f3925127 fix(assistance): Correct Knowledge Base serialaizer Validation
ref: #248 #348
2024-11-28 02:22:02 +09:30
Jon
b8cafeb99b feat(assistance): Add Knowledge Base Category API v2 endpoint
ref: #248 #348
2024-11-28 02:22:02 +09:30
Jon
61450b442d feat(assistance): Add Knowledge Base API v2 endpoint
ref: #248 #348
2024-11-28 02:22:02 +09:30
Jon
7e92760340 fix(api): on permission check error, return authorized=false
ref: #248 #352
2024-11-28 02:22:00 +09:30
Jon
3cb9aa6f59 refactor(assistance): Correct viewset dir name to viwsets
ref: #248 #352
2024-11-28 02:20:45 +09:30
Jon
a77e01f86f feat(api): Depreciate API v1 permission endpoint
ref: #15 #248 #348
2024-11-28 02:20:45 +09:30
Jon
6f7638d9cf test(base): User API ViewSet permission checks
ref: #15 #248 #348
2024-11-28 02:20:45 +09:30
Jon
2b24f29837 test(base): Permission API ViewSet permission checks
ref: #15 #248 #348
2024-11-28 02:20:45 +09:30
Jon
835e5258a5 test(base): Content Type API ViewSet permission checks
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
84de741f53 fix(access): Add missing parameters to Team User fields
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
59e34cae4d test(access): Add missing test cases to Team Users Model
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
4b873a4e44 test(access): Team Users API v2 field checks
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
80d307b2a5 test(access): Team User API ViewSet permission checks
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
9beb9a9d2c feat(access): Add Team Users API endpoint
ref: #248 #348
2024-11-28 02:20:44 +09:30
Jon
636f6c5b58 docs: remove links for files removed
ref: #348
2024-11-28 02:20:44 +09:30
Jon
0877fcf7e9 fix(api): Add missing organization url routes
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
0faa6a5a18 docs(api): Add serializer dev docs
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
fb7fda7ea2 test(access): Team API v2 field checks
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
b6acba9930 test(api): API Response Field checks Abstract Class added
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
af3a84f0dc test(access): Organization API v2 field checks
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
200909fb82 test(access): Team API ViewSet permission checks
ref: #15 #248 #348
2024-11-28 02:20:44 +09:30
Jon
1d198dd2df test(access): Organization API ViewSet permission checks
ref: #15 #248 #348
2024-11-28 02:20:43 +09:30
Jon
c34dd9f2a4 fix(access): ensure org id is an integer during permission checks
ref: #348
2024-11-28 02:20:43 +09:30
Jon
2690e17f93 test(api): API Permission ViewSet Abstract Class added
ref: #15 #248 #345
2024-11-28 02:20:43 +09:30
Jon
5edbdd76f4 docs(swagger): refine normalisation of api v1/v2 docs
ref:  #248 #345 #346
2024-11-28 02:20:43 +09:30
Jon
e917fbf68d feat(access): Depreciate Team API v1 endpoint
ref: #248 #348 #343
2024-11-28 02:20:43 +09:30
Jon
606477cb0d feat(access): Depreciate Organization API v1 endpoint
ref: #248 #348 #343
2024-11-28 02:20:43 +09:30
Jon
8da3a04730 feat(access): Add Organization API endpoint
ref: #248 #348
2024-11-28 02:20:43 +09:30
Jon
c6c8bfd045 feat(base): Add Team API endpoint
ref: #248 #348
2024-11-28 02:20:43 +09:30
Jon
0bd057b436 feat(base): Add Permission API endpoint
ref: #248 #348
2024-11-28 02:20:43 +09:30
Jon
bb93ef3f1d feat(base): Add Content Type API endpoint
ref: #248 #348
2024-11-28 02:20:43 +09:30
Jon
79f17a7d57 feat(api): Add Read Only abstract ViewSet
ref:  #248 #348
2024-11-28 02:20:43 +09:30
Jon
b9301e4697 feat(base): Add user API endpoint
ref:  #248 #348
2024-11-28 02:20:43 +09:30
Jon
074d12b99b docs(swagger): normalize api v1/v2 docs
ref:  #248 #348
2024-11-28 02:20:43 +09:30
Jon
1073b2228e docs(release_notes): fluff out feature freeze details
ref: #346
2024-11-28 02:20:43 +09:30
Jon
a05cf021c1 test(access): Team custom tests to ensure that during model field creation, attribute verbose_name is defined and not empty
as team extends group, filtering of group fields is required so they are not checked when testing

ref:  #248 #345 #346
2024-11-28 02:20:43 +09:30
Jon
c185c192a7 test(itim): port placeholder test for invalid port number
ref: #346
2024-11-28 02:20:42 +09:30
Jon
77ef69488b test: use correct logic when testin field parameters as not being empty or none
ref: #346
2024-11-28 02:20:42 +09:30
Jon
a1625517d1 fix(access): if permission_required attribute doesn't exist during permission check, return empty list
ref: #346
2024-11-28 02:20:42 +09:30
Jon
32d5008f63 fix: Ensure all Model fields are created with attributes help_text and verbose_name
ref:  #248 #346
2024-11-28 02:20:42 +09:30
Jon
e765b03d3b docs: add new requirements for creating a model.
ref:  #248 #345 #346
2024-11-28 02:20:42 +09:30
Jon
01da3f6fd0 test: Ensure that during model field creation, attribute verbose_name is defined and not empty
ref:  #248 #345 #346
2024-11-28 02:20:42 +09:30
Jon
ad72cc4f7d test: Ensure that during model field creation, attribute help_text is defined and not empty
ref:  #248 #345 #346
2024-11-28 02:20:42 +09:30
Jon
1f9070c420 fix(api): correct logic for permission check to use either queryset or get_queryset
ref:  #248 #345 #346
2024-11-28 02:20:27 +09:30
Jon
783f063ef0 feat(api): add v2 endpoint
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
31af310d3d fix(settings): Add attribute table_fields to External Links model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
630223b15a fix(settings): Add attribute page_layout to External Links model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
d64d744f9f fix(settings): Add missing attribute Meta.verbose_name to External Links model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
f67051fb15 fix(settingns): Add missing attribute Meta.ordering to External Links model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
4a5991f9db feat(project_management): Add attribute table_fields to Project Type model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
c0a0bc544a feat(project_management): Add attribute page_layout to Project Type model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
3f03b8710f feat(project_management): Add attribute table_fields to Project State model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
9f8d2acd99 feat(project_management): Add attribute page_layout to Project State model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
dc6f9d3f17 feat(project_management): Add attribute page_layout to Project Milestone model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
4e358a0541 feat(project_management): Add attribute table_fields to Project Milestone model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
8ffffab395 feat(project_management): Add attribute table_fields to Project model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
396566c3be feat(project_management): Add attribute page_layout to Project model
ref:  #248 #345 #346
2024-11-28 02:19:25 +09:30
Jon
5cbb081462 feat(itim): Add attribute table_fields to Service model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
8058369276 feat(itim): Add attribute page_layout to Service model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
c205a75ce0 feat(itim): Add attribute table_fields to Service Port model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
3998325acd feat(itim): Add attribute page_layout to Service Port model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
8f410b370d feat(itim): Add attribute table_fields to Cluster Type model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
790cbaf452 feat(itim): Add attribute page_layout to Cluster Type model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
54796badc9 feat(itim): Add attribute table_field to Cluster model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
939424788f feat(itim): Add attribute page_layout to Cluster model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
73517733b5 feat(itam): Add attribute table_field to Software Category model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
5565670495 fix(itam): Add missing attribute Meta.verbose_name to Software Category model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
66b60e02e6 fix(itam): Add missing attribute Meta.ordering to Software Category model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
d98cd846bf feat(itam): Add attribute table_fields to Software model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
baef2e9287 feat(itam): Add attribute page_layout to Software model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
dbde9144d9 fix(itam): Add missing attribute Meta.verbose_name to Software model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
1d60e1105a fix(itam): Add missing attribute Meta.ordering to Software model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
b1fc59be3a feat(itam): Add attribute table_fields to Operating System Version model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
1e4d6087ff feat(itam): Add attribute page_layout to Operating System Version model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
c45da0f676 fix(itam): Add missing attribute Meta.verbose_name to Operating System Version model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
c1daab6069 fix(itam): Add missing attribute Meta.ordering to Operating System Version model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
372e4c190f feat(itam): Add attribute table_field to Operating System model
ref:  #248 #345 #346
2024-11-28 02:19:24 +09:30
Jon
5cc7ba0237 feat(itam): Add attribute page_layout to Operating System model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
5042124803 fix(itam): Add missing attribute Meta.verbose_name to Operating System model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
ce58d13ab5 fix(itam): Add missing attribute Meta.ordering to Operating System model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
61bfffa3ca feat(itam): Add attribute table_fields to "Device Type" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
0615977024 feat(itam): Add attribute page_layout to "Device Type" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
2563f6f8e5 fix(itam): Add missing attribute Meta.verbose_name to "Device Type" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
21a50f16ae fix(itam): Add missing attribute Meta.ordering to "Device Software" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
f362e3493f feat(itam): Add attribute page_layout to "Device Software" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
f24e645d55 fix(itam): Add missing attribute Meta.verbose_name to "Device Software" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
26640926a8 feat(itam): Add attribute table_fields to "Device Software" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
da49b98c60 feat(itam): Add attribute page_layout to "Device Software" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
ab69d8d174 fix(itam): Add missing attribute Meta.verbose_name to "Device Software" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
2f0a2e282b fix(itam): Add missing attribute Meta.ordering to "Device Software" model
ref:  #248 #345 #346
2024-11-28 02:19:23 +09:30
Jon
b57df0d5bc fix(itama): Add missing attribute Meta.verbose_name to "Device Model" model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
6ecaa08782 feat(core): Add attribute table_fields to Ticket Comment Category model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
f134b6828f feat(core): Add attribute page_layout to Ticket Comment Category model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
5776a61ff4 feat(core): Add attribute page_layout to Ticket comment model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
a1bd6a81b3 feat(core): Add attribute table_fields to Ticket Category model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
f814151d33 feat(core): Add attribute page_layout to Ticket Category model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
1d1e295af7 feat(core): Add attribute page_layout to Ticket model
this model does not require this to be filled out as it uses a custom view

ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
a78f7660e2 feat(core): Add attribute page_layout to Notes model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
8fa468f735 fix(core): Add missing attribute Meta.verbose_name to Notes model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
65759827c8 feat(core): Add attribute table_fields to Manufacturer model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
98ded4c748 feat(core): Add attribute page_layout to Manufacturer model
ref:  #248 #345 #346
2024-11-28 02:19:22 +09:30
Jon
18f8e515d8 fix(core): Add missing attribute Meta.verbose_name to Manufacturer model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
8121879165 feat(access): Add attribute table_fields to Config Group Software model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
066d8b903a feat(access): Add attribute page_layout to Config Group Software model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
11fd7f8c6c fix(access): Add missing attribute Meta.verbos_name to Config Group Software model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
3b358599ad feat(access): Add attribute table_fields to Config Groups model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
7dcde1926e feat(access): Add attribute page_layout to Config Groups model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
9e3a61a890 fix(access): Add missing attribute Meta.verbos_name to Config Groups model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
3080b1c1b7 fix(access): Add missing attribute Meta.ordering Config Groups model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
8e0af707cf feat(access): Add attribute table_fields to KB model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
d5a4a570e3 feat(access): Add attribute page_layout to KB model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
8824fcebdf feat(access): Add attribute table_fields to KB Category model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
e52a9c0003 feat(access): Add attribute page_layout to KB Category model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
ebf51da951 feat(access): Add attribute table_fields to Team model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
af27b55ad7 feat(access): Add attribute page_layout to Team model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
617bbcc724 fix(access): Add missing meta field verbose_name to Team model
ref:  #248 #345 #346
2024-11-28 02:19:21 +09:30
Jon
72c42f07cb test(api): Ensure models have Meta.ordering set and not empty
ref:  #345 #346
2024-11-28 02:19:21 +09:30
Jon
67b8648a69 test(api): viewset documentation attr check
ref:  #345 #346
2024-11-28 02:19:21 +09:30
Jon
37176458ac feat(core): Add table_fields to Ticket Model
ref:  #345 #346
2024-11-28 02:19:21 +09:30
Jon
ad1b35dfc7 fix(api): during permission checking if request is HTTP/Options and user is authenticated, allow access
ref:  #345 #346
2024-11-28 02:19:21 +09:30
Jon
cf8014a26b fix(api): during permission checking dont attempt to access view obj if it doesn't exist
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
030bb13396 test(api): fix index import to correct viewset
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
fe6a405a41 test(itam): Add index viewset checks
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
97afeeb45d feat(itam): Add v2 endpoint ITAM
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
d23c2907cf feat(base): Add User Serializer
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
8f9682b0c4 test(Settings): Add index viewset checks
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
244ae6c3f9 feat(settings): Add v2 endpoint Settings
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
1b5411136d test(project_management): Add index viewset checks
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
11cf3a11fc feat(project_management): Add v2 endpoint Project Management
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
3a3ec331d7 test(itim): Add index viewset checks
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
1df9589d55 feat(itim): Add v2 endpoint ITIM
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
039ae89814 test(config_management): Add index viewset checks
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
976f5da446 feat(config_management): Add v2 endpoint Config Management
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
af9d99774e test(assistance): Add index viewset checks
ref:  #345 #346
2024-11-28 02:18:26 +09:30
Jon
aa57005013 feat(assistance): Add v2 endpoint Assistance
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
374c18d997 test(access): Add index viewset checks
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
73d56692d1 feat(access): Add v2 endpoint Access
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
8b0bcfa886 feat(itim): Add table_fields to Service Model
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
4a27360b7c fix(itam): Add missing model.Meta attributes ordering and verbose_name
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
a93e5625be feat(core): Add table_fields to Device Software Model
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
fa9a36dffa refactor(itam): Cleanup Device Software model field names.
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
766706268b feat(core): Add table_fields to Notes Model
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
36d044dc43 refactor(core): Change history fields after and before to be JSON fields
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
b827dfac61 feat(core): Add table_fields to History Model
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
b5c1e85258 feat(itam): Add table_fields and page_layout to Device Model
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
f8a1087af3 feat(itam): Add table_fields and page_layout to Device Model
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
a776fcc760 feat(core): Add table_fields to Ticket Linked Item
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
8f2726aafb feat(core): Add table_fields to Ticket Comment
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
95675da022 feat(core): Add table_fields to Ticket
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
3488d200b6 feat(core): Add attribute staatus_badge to ticket model
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
20b77b4b1e feat(access): Add table_fields and page_layout to Organization
ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
d545efc0d3 feat(api): Add React UI metadata class
adds required items to HTTP/Options request

ref:  #345 #346
2024-11-28 02:18:25 +09:30
Jon
8a70ec1452 test(api): Add API v2 Endpoint
ref: #248 #345 #346
2024-11-28 02:18:25 +09:30
Jon
b8c127d144 feat(api): Add API v2 Endpoint
ref: #248 #345 #346
2024-11-28 02:18:25 +09:30
Jon
447c46eb47 refactor(api): Split common ViewSet class into index/model classes
ref: #345 #346
2024-11-28 02:18:25 +09:30
Jon
9fe671e43c test(api): ViewSet checks
ref: #345 #346
2024-11-28 02:18:25 +09:30
Jon
3bfd2d4ef6 feat(api): add API login template to use current login form
ref: #345 #346
2024-11-28 02:18:25 +09:30
Jon
65a47db81d feat(api): Update API template to use name Centurion
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
b471718b6a feat(itam): Add category property to device software model
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
50e6a24a4d feat(itam): Add action badge property to device software model
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
935dfb7faa feat(itam): Add status badge property to device model
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
849b8da7eb refactor(itam): remove requirement to specify the pk when fetching config
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
991fb3432c feat(core): Add a icon serializer field.
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
c0cf657bea feat(core): Add a badge serializer field.
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
07ceae6471 test: Ensure Models have attribute page_layout
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
5a88b23ae7 test: Ensure Models have attribute table_fields
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
d9783477ce test: Ensure Models have meta attribute verbose_name
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
7b7b12d08e feat(api): Add common ViewSet class for inheritence
ref: #345 #346
2024-11-28 02:18:24 +09:30
Jon
cbe01e6b77 feat: Add dependency django-cors-headers
ref: #344
2024-11-28 02:18:24 +09:30
Jon
68c787fab4 docs(release_notes): add api v1 depreciaation note
ref: #344
2024-11-28 02:18:24 +09:30
26b0bfac70 build: bump version 1.3.0 -> 1.3.1 2024-11-27 16:32:01 +00:00
Jon
d68d6f85d2 Merge pull request #399 from nofusscomputing/fix-ticket-different-org-view 2024-11-28 01:50:41 +09:30
Jon
61f34876ed fix(core): Ensure user cant view tickets in orgs they are not part of
ref: #399
2024-11-28 01:40:24 +09:30
Jon
ed0e57c8a1 test(access): Add dummy functional test for CI to complete
ref: #382
2024-11-07 18:41:27 +09:30
Jon
49dabbd941 chore(docs): Add Functional Test Badges
ref: #382
2024-11-07 17:56:20 +09:30
4b8353350b build: bump version 1.2.2 -> 1.3.0 2024-10-31 06:44:57 +00:00
Jon
464af55612 Merge pull request #371 from nofusscomputing/feature-production-webserver 2024-10-31 16:01:13 +09:30
Jon
9f826d7142 docs: Update release notes
ref: #371 closes #363
2024-10-31 15:50:57 +09:30
Jon
ea8a054005 fix(docker): Ensure SupervisorD daemon config directory exists.
ref: #363 #371
2024-10-31 15:19:50 +09:30
Jon
8479130ef1 feat(docker): Add worker service config for SupervisorD
ref: #363 #371
2024-10-31 15:00:55 +09:30
Jon
4303232543 refactor(docker): Switch to entrypoint
ref: #363 #371
2024-10-31 14:58:18 +09:30
Jon
0cd4a2bab4 fix(docker): use alias for static
ref: #363 #371
2024-10-30 04:07:58 +09:30
Jon
0b4fc25462 fix(access): testing of param causing gunicorn to fail
ref: #363 #371
2024-10-30 02:39:42 +09:30
Jon
f17d74f8dc fix(docker): place nginx conf in correct path
ref: #363 #371
2024-10-30 02:39:03 +09:30
Jon
07be745bbe fix(docker): gunicorn must call method
ref: #363 #371
2024-10-30 02:37:49 +09:30
Jon
510ab69af8 fix(docker): Ensure NginX config applied after it's installed
ref: #363 #371
2024-10-30 01:50:41 +09:30
Jon
b9349e6590 fix(docker): Add proxy params for NginX
ref: #363 #371
2024-10-30 01:24:35 +09:30
Jon
4fd3abb9d6 fix(docker): Make centurion the default nginx conf
ref: #363 #371
2024-10-30 01:24:13 +09:30
Jon
ac562e7490 feat(docker): ensure supervisor starts
ref: #363 #371
2024-10-30 00:57:02 +09:30
Jon
4fe5916a76 feat(docker): use correct file location for nginx config
ref: #363 #370 #371
2024-10-30 00:39:03 +09:30
Jon
b858825838 feat(docker): Fail the build if django is not found
ref: #363 #370 #371
2024-10-30 00:31:10 +09:30
Jon
5d92a3315f fix(docker): Correct NginX start command
ref: #363 #371
2024-10-30 00:30:34 +09:30
Jon
7a0f85c556 feat(docker): Install NginX to serve site
ref: #363 #371
2024-10-30 00:12:20 +09:30
Jon
cfa284d4ad feat(docker): Add supervisord for install
ref: #363 #371
2024-10-30 00:10:10 +09:30
Jon
447e985740 feat(docker): Add gunicorn for install
ref: #363 #371
2024-10-30 00:08:54 +09:30
Jon
7d872b97f2 feat: update docker image alpine 3.19 ->3.20
ref: #363 #371
2024-10-30 00:06:57 +09:30
ca3b99cb3a build: bump version 1.2.1 -> 1.2.2 2024-10-29 13:00:55 +00:00
Jon
8d4f686f6c Merge pull request #369 from nofusscomputing/fix-docker-container 2024-10-29 22:23:56 +09:30
Jon
6f57bd84e7 fix(docker): adjust pyyaml to >-6.0.1
no python modules are being installed

ref: #369
2024-10-29 19:05:39 +09:30
6351acabe5 build: bump version 1.2.0 -> 1.2.1 2024-10-22 09:16:31 +00:00
Jon
9d6ea1d7c3 refactor(project_management): dont order queryset for project
this is done at modelMeta

ref: #358
2024-10-22 18:36:21 +09:30
Jon
035c6ed60c fix(project_management): Ensure user cant see projects for organizations they are apart of
ref: #358
2024-10-22 18:31:21 +09:30
31e88b2f96 build: bump version 1.1.0 -> 1.2.0 2024-10-11 14:59:15 +00:00
Jon
28f51d3bb6 Merge pull request #259 from nofusscomputing/feature-v1-2 2024-10-12 00:11:22 +09:30
Jon
c634695e4e feat: update django 5.0.8 -> 5.1.2
ref: #259
2024-10-11 23:56:10 +09:30
Jon
983921fc22 chore: squash migrations
squash all to limit number of migrations required

ref: #259
2024-10-11 23:41:03 +09:30
Jon
9fc5b0eb09 Merge pull request #341 from nofusscomputing/340-project-name-length 2024-10-05 12:23:15 +09:30
Jon
b1fc8e0f98 feat(settings): Add API filter and search
ref: #341
2024-10-05 11:42:39 +09:30
Jon
551473feb7 feat(core): Add API filter of fields external_system and external_ref for projects
ref: #341
2024-10-05 11:42:39 +09:30
Jon
105cb63d71 feat(core): Add API filter of fields external_system and external_ref to tickets
ref: #341
2024-10-05 11:42:39 +09:30
Jon
1dda4a9fb5 feat(project_management): increase project field length 50 -> 100 chars
ref: #341 closes #340
2024-10-05 11:42:39 +09:30
Jon
c53ec9ec5d Merge pull request #339 from nofusscomputing/321-ticket-field-length 2024-09-30 13:20:05 +09:30
Jon
a44b2479e3 feat(core): increase ticket title field length 50 -> 100 chars
ref: #339  closes #321
2024-09-30 13:09:02 +09:30
Jon
ec26e16132 Merge pull request #309 from nofusscomputing/ticket-work 2024-09-22 12:28:09 +09:30
Jon
59a930f934 feat(core): Add ability track ticket estimation time for completion
ref: #296 #309 #312
2024-09-21 15:48:06 +09:30
Jon
c7701bb2df feat(core): Add ability to delete a ticket
ref: #296 #309
2024-09-21 14:31:07 +09:30
Jon
4ac0da6ba2 fix: ensure model mandatory fields don't specify a default value
ref: #309 fixes #306
2024-09-21 14:03:47 +09:30
Jon
19ad262617 feat(core): [Templating Engine] Add template tag concat_strings
ref: #296 #309
2024-09-21 13:13:07 +09:30
Jon
0e987088a3 feat(itim): Add ticket tab to services
shows related tickets

ref: #296 #309
2024-09-21 13:12:28 +09:30
Jon
c74b89e0d6 feat(itim): Add ticket tab to clusters
shows related tickets

ref: #296 #309
2024-09-21 13:12:16 +09:30
Jon
e762713416 feat(itam): Add ticket tab to software
shows related tickets

ref: #296 #309
2024-09-21 13:12:01 +09:30
Jon
facdd0111b feat(itam): Add ticket tab to operating systems
shows related tickets

ref: #296 #309
2024-09-21 13:11:48 +09:30
Jon
280abb8841 feat(itam): Add ticket tab to devices
shows related tickets

ref: #296 #309
2024-09-21 13:11:24 +09:30
Jon
064f74736f feat(config_management): Add ticket tab to conf groups
ref: #296 #309
2024-09-21 13:10:36 +09:30
Jon
d26868eced refactor(core): Ticket Linked ref render as template
ref: #296 #309
2024-09-21 12:28:00 +09:30
Jon
b5ec42fc56 fix(api): Ensure user is set to current user for ticket comment
ref: #296 #309
2024-09-21 12:01:58 +09:30
Jon
104575780a test(core): Ticket Linked item view checks
ref: #296 #309
2024-09-21 11:45:24 +09:30
Jon
1c1f4ecdfa test(core): Ticket Linked item permission checks
ref: #296 #309
2024-09-21 11:45:13 +09:30
Jon
582ee4031d docs(core): correct typos
ref: #309
2024-09-21 10:57:24 +09:30
Jon
fca8ad5a78 Merge pull request #308 from nofusscomputing/linked-item 2024-09-20 17:22:46 +09:30
Jon
fff3a96889 fix(core): remove org field when editing a ticket
ref: #308
2024-09-20 16:57:53 +09:30
Jon
dfdc5bac9d feat(core): Add slash command link for linking items to tickets
ref: #296 #308
2024-09-20 16:57:34 +09:30
Jon
c022551427 feat(core): Add to markdown rendering model references
ref: #296 #308
2024-09-20 15:26:38 +09:30
Jon
76954c019b feat(core): Ability to link items to all ticket types
ref: #296 #308
2024-09-20 15:25:42 +09:30
Jon
c3de79050e feat(core): add model ticket linked items
ref: #296 #308
2024-09-20 12:39:54 +09:30
Jon
3cce436938 Merge pull request #301 from nofusscomputing/293-missing-project-fields 2024-09-18 17:03:21 +09:30
Jon
ed2bf96626 chore(core): during validation, Catch random errors and show user stack trace
ref: #301 #305
2024-09-18 16:59:17 +09:30
Jon
3693ddadad fix(core): during validation, if subscribed users not specified, use empty list
ref: #301 closes #305
2024-09-18 16:58:42 +09:30
Jon
8866f94fab docs(project_management): interim project pages
ref: #295 #300
2024-09-18 16:43:25 +09:30
Jon
0ae1395d92 test(project_management): Project Milestone api permission checks
ref: #301 closes #285 closes #295
2024-09-18 15:19:08 +09:30
Jon
cf73323dd3 feat(project_management): Add project milestones api endpoint
ref: #285 #301
2024-09-18 14:53:33 +09:30
Jon
f019c50e44 feat(project_management): Add import_project permission and add api serializer
ref: #295 #301
2024-09-18 13:20:44 +09:30
Jon
3e56c9861c feat(core): great odins beard, remove the checkbox formatting
ref: #301
2024-09-18 12:36:58 +09:30
Jon
d6f475a009 feat(project_management): Add field is_deleted to projects
preparation for the purge permission.

ref: #301 closes #293
2024-09-18 12:30:18 +09:30
Jon
b2f20766de feat(project_management): Calculate project completion percentage and display
ref: #293 #301
2024-09-18 12:16:22 +09:30
Jon
81e98cfd6f Merge pull request #300 from nofusscomputing/295-project-work 2024-09-18 00:57:59 +09:30
Jon
8cae85badc fix(core): add missing pagination to ticket comment categories index
ref: #300 fixes #291
2024-09-18 00:52:11 +09:30
Jon
d6e0fd0b46 fix(core): add missing pagination to ticket categories index
ref: #300 fixes #289
2024-09-18 00:51:48 +09:30
Jon
8d7d79c29b feat(core): order project categories with parent name if applicable
ref: #300 closes #290
2024-09-18 00:46:53 +09:30
Jon
92d3692f85 fix(project_management): Ensure project type and state show on index page
ref: #295 #300
2024-09-18 00:20:07 +09:30
Jon
7f094a9f96 test(project_management): Project TYpe tenancy model checks
ref: #295 #300 closes #294
2024-09-18 00:11:17 +09:30
Jon
7c9d6ced6a test(project_management): Project Type view checks
ref: #294 #295 #300
2024-09-18 00:10:36 +09:30
Jon
9b747b08da test(project_management): Project Type permission checks
ref: #294 #295 #300
2024-09-18 00:10:18 +09:30
Jon
f4695bad1e test(project_management): Project Type core history checks
ref: #294 #295 #300
2024-09-18 00:10:01 +09:30
Jon
744f2f380f test(project_management): Project Type tenancy object checks
ref: #294 #295 #300
2024-09-18 00:09:41 +09:30
Jon
22c6b9d3fe feat(project_management): Add Project Type to the UI
ref: #294 #295 #300
2024-09-18 00:05:15 +09:30
Jon
c1aeb3a258 chore(project_management): cleanup Project State
ref: #294 #295 #300
2024-09-17 23:56:47 +09:30
Jon
0eb6a8bde9 test(project_management): Project State permission checks
ref: #294 #295 #300
2024-09-17 17:21:58 +09:30
Jon
477f089de3 test(project_management): Project State tenancy model checks
ref: #294 #295 #300
2024-09-17 17:21:26 +09:30
Jon
64faffa7b6 test(project_management): Project State view checks
ref: #294 #295 #300
2024-09-17 17:21:16 +09:30
Jon
2196db9479 test(project_management): Project State core history checks
ref: #294 #295 #300
2024-09-17 17:20:59 +09:30
Jon
14d949228d test(project_management): Project State tenancy object checks
ref: #294 #295 #300
2024-09-17 17:20:44 +09:30
Jon
f8e96a556d feat(project_management): Add Project State to the UI
ref: #294 #295 #300
2024-09-17 17:20:00 +09:30
Jon
5ad974f947 revert(core): revert ticket class defined in dir init
reef: #300
2024-09-17 17:14:11 +09:30
Jon
9c9009ff52 test(project_management): Project type API permission checks
ref: #294 #295 #300
2024-09-17 14:09:12 +09:30
Jon
bd09412f6f test(project_management): Project state API permission checks
ref: #294 #295 #300
2024-09-17 14:05:15 +09:30
Jon
82d48fe27b Merge pull request #299 from nofusscomputing/294-feat-project-state-type 2024-09-17 13:54:57 +09:30
Jon
1315cc584b feat(project_management): add priority field to project model, form and api endpoint
ref: #293 #299
2024-09-17 13:50:06 +09:30
Jon
17bed1ef7a Merge pull request #298 from nofusscomputing/294-feat-project-state-type 2024-09-17 13:26:34 +09:30
Jon
f0dd7bc256 feat(project_management): add organization field to project form and api endpoint
ref: #293 #298
2024-09-17 13:21:08 +09:30
Jon
5b356c3c11 feat(project_management): add project_type field to project form
ref: #294 #298
2024-09-17 13:14:53 +09:30
Jon
fbbae64ff2 feat(project_management): add external_ref and external_system field to project model
ref: #294 #298
2024-09-17 13:12:54 +09:30
Jon
34b85441e2 feat(project_management): add project type field to project model
ref: #294 #298
2024-09-17 13:12:26 +09:30
Jon
e9b122cf8c feat(project_management): add project type api endpoint
ref: #294 #298
2024-09-17 13:07:50 +09:30
Jon
3f0853654e feat(project_management): new model project type
ref: #294 #298
2024-09-17 13:06:15 +09:30
Jon
0de451af70 feat(project_management): add project state api endpoint
ref: #294 #298
2024-09-17 12:50:43 +09:30
Jon
a4926f8a0d feat(project_management): add project state field to project model
ref: #294 #298
2024-09-17 12:49:53 +09:30
Jon
1314f9a1ff feat(project_managemenet): new model project state
ref: #294 #298
2024-09-17 12:46:48 +09:30
Jon
d5e344f67c Merge pull request #292 from nofusscomputing/project-milestone 2024-09-16 16:27:54 +09:30
Jon
d8654fae6d test(project_management): Project miletone skipped api checks
ref: #285 #292
2024-09-16 16:22:14 +09:30
Jon
033f47b6b9 feat(project_management): add field external system to projects
ref: #292
2024-09-16 16:05:37 +09:30
Jon
383bca4ff9 refactor(core): migrate ticket enums to own class
ref: #292
2024-09-16 15:59:54 +09:30
Jon
22f7b1e7c5 fix(core): Add replacement function within ticket validation as cleaned_data attribute replacement
ref: #292
2024-09-16 13:57:57 +09:30
Jon
d5ad03546c fix(core): Ensure the ticket clears project field on project removal
ref: #292
2024-09-16 12:48:32 +09:30
Jon
f79076ddef fix(core): Remove ticket fields user has no access to
ref: #292
2024-09-16 12:42:37 +09:30
Jon
7a31498e91 refactor(core): Ticket validation errors setup for both api and ui
ref: #285 #292
2024-09-16 12:42:00 +09:30
Jon
95f9d90877 feat(core): validate field milestone for all ticket types
ref: #285 #292
2024-09-16 12:41:04 +09:30
Jon
3bac0c19ac feat(core): Add field milestone to all ticket types
ref: #292
2024-09-16 03:50:18 +09:30
Jon
b8f4123185 refactor(core): for tickets use validation for organization field
ref: #292
2024-09-16 03:49:05 +09:30
Jon
d2e9c838de refactor(core): refine ticket field permission and validation
ref: #292
2024-09-16 03:45:38 +09:30
Jon
5cd51ba00e test(project_management): Project Milestone tenancy model checks
ref: #285 #292
2024-09-14 16:12:56 +09:30
Jon
a3fafdafbd test(project_management): Project Milestone view checks
ref: #285 #292
2024-09-14 16:12:31 +09:30
Jon
df9ad069c4 test(project_management): Project Milestone ui permission checks
ref: #285 #292
2024-09-14 16:12:04 +09:30
Jon
2ff3dab014 test(project_management): Project Milestone core history checks
ref: #285 #292
2024-09-14 16:11:39 +09:30
Jon
ae9526ef57 test(project_management): Project Milestone Tenancy object checks
ref: #285 #292
2024-09-14 16:11:28 +09:30
Jon
5e235617e0 feat(project_management): Add project milestones
ref: #285 #292
2024-09-14 16:09:07 +09:30
Jon
a373247cda Merge pull request #284 from nofusscomputing/ticket-categories 2024-09-14 13:26:40 +09:30
Jon
c81e319aac feat(core): Add slash command "related ticket" for ticket and ticket comments
ref: #284 closes #287
2024-09-14 13:19:39 +09:30
Jon
d05537a619 fix(core): correct logic for slash command /spend
ref: #284 c#286
2024-09-14 11:20:47 +09:30
Jon
7894ac5522 docs(core): Add slash command /spend for ticket and ticket comments
ref: #284 closes #286
2024-09-13 22:27:48 +09:30
Jon
64577cf806 feat(core): Suffix username to action comments
ref: #250 #284
2024-09-13 21:59:04 +09:30
Jon
c3307152e8 feat(core): Add slash command /spend for ticket and ticket comments
ref: #284 closes #286
2024-09-13 21:58:19 +09:30
Jon
a7e99eb5b4 refactor: reduce action comment spacing
ref: #24 #284
2024-09-13 21:07:35 +09:30
Jon
c45aae7048 chore: docs linting errors
ref: #284
2024-09-13 16:22:43 +09:30
Jon
9cb3afeb30 feat(core): Disable HTML tag rendering for markdown
ref: #284 closes #271
2024-09-13 16:19:42 +09:30
Jon
6e7e6587c2 docs: update roadmap
ref: #284
2024-09-13 15:01:41 +09:30
Jon
5f3c7296b7 feat(project_management): remove requirement for code field to be populated
ref: #14 #284
2024-09-13 14:39:50 +09:30
Jon
2e15e61059 fix(project_management): correct project view permissions
ref: #14 #284
2024-09-13 14:35:37 +09:30
Jon
574357b60a test(core): Project tenancy model checks
ref: #14 #284
2024-09-13 14:35:09 +09:30
Jon
1576605acb test(core): Project view checks
ref: #14 #284
2024-09-13 14:34:57 +09:30
Jon
9d564ffbb2 test(core): Project UI permission checks
ref: #14 #284
2024-09-13 14:34:47 +09:30
Jon
b56f3236fd test(core): Project API permission checks
ref: #14 #284
2024-09-13 14:34:38 +09:30
Jon
6e566b8840 test(core): Project history checks
ref: #14 #284
2024-09-13 14:34:28 +09:30
Jon
34a1a19089 test(core): Project Tenancy object checks
ref: #14 #284
2024-09-13 14:34:19 +09:30
Jon
80dc797651 test(core): Ticket comment category API permission checks
ref: #284 closes #283
2024-09-13 13:59:11 +09:30
Jon
f2a4223d25 feat(core): Add ticket comment category API endpoint
ref: #283 #284
2024-09-13 13:54:42 +09:30
Jon
902aaf31dd fix(core): Correct view permissions for ticket comment category
ref: #283 #284
2024-09-13 13:41:20 +09:30
Jon
1be23148d7 test(core): add missing ticket category view checks
ref: #283 #284
2024-09-13 13:40:57 +09:30
Jon
88d6a73454 test(core): ticket comment category tenancy model checks
ref: #283 #284
2024-09-13 13:40:26 +09:30
Jon
01c57b37ad test(core): ticket comment category view checks
ref: #283 #284
2024-09-13 13:40:03 +09:30
Jon
9fbb88fa5f test(core): ticket comment category ui permission checks
ref: #283 #284
2024-09-13 13:38:15 +09:30
Jon
a0b0d79777 test(core): ticket comment category history checks
ref: #283 #284
2024-09-13 13:38:03 +09:30
Jon
f3dccd3b84 test(core): ticket comment category tenancy model checks
ref: #283 #284
2024-09-13 13:37:49 +09:30
Jon
56b715797e feat(core): Ability to assign categories to ticket comments
ref: #14 #96 #93 #95 #90 #283 #283 #284
2024-09-13 13:30:36 +09:30
Jon
11948c9500 feat(core): Add ticket comment categories
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 13:14:25 +09:30
Jon
1161bf79aa fix(core): correct url typo for ticket category API endpoint
ref: #283 #284
2024-09-13 12:45:33 +09:30
Jon
40f564b32a fix(core): dont attempt to modify field for ticket category API list
ref: #283 #284
2024-09-13 12:45:13 +09:30
Jon
4fdabc16ba test(core): ticket category API permission checks
ref: #283 #284
2024-09-13 12:38:26 +09:30
Jon
e68dbdfb4c test(core): ticket category history checks
ref: #283 #284
2024-09-13 12:38:14 +09:30
Jon
f2898037b0 test(core): ticket category tenancy model checks
ref: #283 #284
2024-09-13 12:37:48 +09:30
Jon
5d116c7224 feat(core): Extend all ticket endpoints to contain ticket categories
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 12:25:30 +09:30
Jon
2a31815267 feat(core): Add ticket category API endpoint
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 12:24:36 +09:30
Jon
ded6a72072 test(core): ticket category model checks
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 11:26:50 +09:30
Jon
7d80857d8d test(core): view checks
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 11:26:27 +09:30
Jon
297e318243 test(core): ui permissions
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 11:26:14 +09:30
Jon
6cc992f6d6 fix(core): Dont attempt to render ticket category if none
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 11:25:37 +09:30
Jon
6402897329 fix(core): Correct the delete permission
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 11:25:14 +09:30
Jon
5f7d0e474e feat(core): Ability to assign categories to tickets
ref: #14 #96 #93 #95 #90 #283 #284
2024-09-13 11:03:40 +09:30
Jon
09bb2d8e27 feat(core): Addpage titles to view abstract classes
ref: #283
2024-09-13 10:43:04 +09:30
Jon
e28dbea05b feat(core): Add ticket categories
ref: #283 #284
2024-09-13 10:42:16 +09:30
Jon
9d8c894cff Merge pull request #270 from nofusscomputing/feat-2024-09-11 2024-09-12 18:41:47 +09:30
Jon
9942348ba3 docs(development): add markdown refs
ref: #14 #96 #93 #95 #90 #270 closes #250
2024-09-12 17:58:55 +09:30
Jon
2e98eda8a4 fix(core): correct project task reply link for comments
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-12 17:21:43 +09:30
Jon
2ab2b65fc2 refactor(core): update markdown styles
ref: #270 #271
2024-09-12 17:09:39 +09:30
Jon
3e684b117f refactor(core): migrate ticket number rendering as markdown_it plugin
ref: #270 #271
2024-09-12 16:28:27 +09:30
Jon
51f28a6cf8 refactor(core): move markdown functions out of ticket model
ref: #270 ##271
2024-09-12 16:16:29 +09:30
Jon
212e864db1 feat(core): during markdown render, if ticket ID not found return the tag
ref: #270
2024-09-12 12:40:46 +09:30
Jon
0adfd95ced fea(core): Add opened_by user as subscribed to ticket when creating
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-12 12:40:35 +09:30
Jon
c9d05152c9 feat(core): Add heading anchor plugin to markdown
ref: #270
2024-09-12 00:49:26 +09:30
Jon
a8b21d7c74 feat(core): correct markdown formatting for KB articles
ref: #270
2024-09-12 00:04:51 +09:30
Jon
97874b73f6 docs: correct date
ref: #270
2024-09-11 22:51:58 +09:30
Jon
948713d13d test(core): correct project tests for triage user
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 22:45:58 +09:30
Jon
63146aa41c feat(core): remove project field from being editable when creating project task
ref: #14 #270
2024-09-11 22:31:55 +09:30
Jon
c7f69ad7c1 feat(core): Add admonition style
ref: #14 #96 #93 #95 #90 #250 #270 closes #272
2024-09-11 22:19:23 +09:30
Jon
008f8c1554 feat(project_management): Validate project task has project set
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 21:20:59 +09:30
Jon
122216dbe4 chore(core): remove unused markdown import
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 21:15:21 +09:30
Jon
c0ac09b928 fix(core): correct project task comment buttons
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 20:16:05 +09:30
Jon
cfda7e5e1e feat(core): set project ID to match url kwarg
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 20:15:37 +09:30
Jon
91af43adba feat(core): Add action comment on title change
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 19:14:44 +09:30
Jon
bfb7176db3 feat(core): Add task listts plugin to markdowm
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 19:14:22 +09:30
Jon
411cd5d4a3 feat(core): Add footnote plugin to markdowm
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 19:14:07 +09:30
Jon
91aa87d122 feat(core): Add admonition plugin to markdowm
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 19:13:58 +09:30
Jon
14bdc67a4a feat(core): Add table extension to markdowm
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 19:13:35 +09:30
Jon
b86b1fd1ad feat(core): Add strikethrough extension to markdowm
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 19:13:25 +09:30
Jon
00ec5179f9 feat(core): Add linkify extension to markdowm
ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 19:13:02 +09:30
Jon
200c9d8d8d feat(core): move markdown parser py-markdown -> markdown-it
py-markdown was missing a lot of the common/gfm items.

ref: #14 #96 #93 #95 #90 #250 #270
2024-09-11 19:12:05 +09:30
Jon
b69d210759 chore(core): remove superuser clause
ref: #250 #96 #93 #95 #90 #270
2024-09-11 15:26:06 +09:30
Jon
eb4a58ed01 fix(project_management): correct comment reply url name
ref: #14 #270
2024-09-11 15:21:55 +09:30
Jon
bc2f30ac9b feat(core): Add organization column to ticket pages
ref: #250 #96 #93 #95 #90 #270
2024-09-11 15:21:19 +09:30
Jon
e87bbe9ed8 fix(core): Generate the correct edit url for tickets
ref: #250 #96 #93 #95 #90 #270
2024-09-11 15:20:54 +09:30
Jon
68785ef6c0 fix(core): Generate the correct comment urls for tickets
ref: #250 #96 #93 #95 #90 #270
2024-09-11 15:20:21 +09:30
Jon
b78e2adb09 fix(core): Redirect to correct url for itim tickets after adding comment
ref: #250 #96 #93 #95 #90 #270
2024-09-11 15:19:03 +09:30
Jon
26c985e683 feat(core): Allow super-user to edit ticket comment source
ref: #250 #96 #93 #95 #90 #270
2024-09-11 14:07:59 +09:30
Jon
58e2b9f7f5 feat(core): Render linked tickets the same as the rendered markdown link
ref: #250 #96 #93 #95 #90 #270
2024-09-11 13:50:17 +09:30
Jon
34f2d4c4d4 chore(core): remove model history link
not required as the history is saved as action comments

ref: #250 #96 #93 #95 #90 #270
2024-09-11 13:18:27 +09:30
Jon
56c3b9d7de feat(core): Add project task link for related project task
ref: #250 #96 #93 #95 #90 #270
2024-09-11 13:14:07 +09:30
Jon
c83ffe542e fix(core): correct linked tickets hyperlink address
ref: #250 #96 #93 #95 #90 #270
2024-09-11 13:09:24 +09:30
Jon
b07872c8c2 feat(project_management): Add project duration field
ref: #14 #270
2024-09-11 12:50:31 +09:30
Jon
1cc196fd06 feat(core): Add external ref to tickets if populated
ref: #250 #96 #93 #95 #90 #270
2024-09-11 12:36:47 +09:30
Jon
dd68bfbea8 refactor(core): Adjust test layout for itsm and project field based permissions
ref: #250 #96 #93 #95 #90 #264 #268
2024-09-11 12:18:24 +09:30
Jon
ea5888f39f Merge pull request #267 from nofusscomputing/feat-ticket-comments 2024-09-10 17:11:33 +09:30
Jon
78607a0bf9 test(core): Project task permission checks
ref: #250 #96 #93 #95 #90 #264 #267
2024-09-10 17:01:57 +09:30
Jon
fa9cff390a feat(core): Add project task permissions
ref: #250 #96 #93 #95 #90 #264 #267 fixes #269
2024-09-10 17:01:24 +09:30
Jon
2613a132a6 fix(core): order ticket comments by creation date
oldest first..

ref: #250 #96 #93 #95 #90 #264 #267 fixes #269
2024-09-10 16:26:04 +09:30
Jon
7d8b54a980 fix(core): Ensure for both ticket and comment, external details are unique.
ref: #250 #96 #93 #95 #90 #264 #267 fixes #268
2024-09-10 16:09:44 +09:30
Jon
6371fa03a1 chore(project_management): remove non-ticket based project tasks
project tasks scope was moved to a type of ticket.

ref: #14 #250 #267
2024-09-10 15:52:34 +09:30
Jon
daa872d2e7 feat(project_management): Add project tasks
ref: #14 #250 #267
2024-09-10 15:38:30 +09:30
Jon
4d1600e396 refactor(project_management): migrate projects to new style for views
ref: #14 #267
2024-09-10 15:27:05 +09:30
Jon
63d33c287c feat(api): Add project tasks endpoint
ref: #14 #267
2024-09-10 13:42:03 +09:30
Jon
ae72d4ab6a feat(api): Add projects endpoint
ref: #14 #267
2024-09-10 13:37:13 +09:30
Jon
8a747d1d1f feat(api): Add project management endpoint
ref: #14 #267
2024-09-10 13:33:21 +09:30
Jon
55e512efb8 test(core): Ticket comment API permission checks
ref: #250 #96 #93 #95 #90 #264 #267
2024-09-10 12:16:16 +09:30
Jon
f09e7b77db fix(core): Ensure on ticket comment create and update a response is returned
ref: #250 #96 #93 #95 #90 #264 #267
2024-09-10 12:16:03 +09:30
Jon
4177f71972 test(core): Ticket comment permission checks
ref: #250 #96 #93 #95 #90 #264 #267
2024-09-10 11:42:10 +09:30
Jon
0c3e38c543 test(core): Ticket comment Views
ref: #250 #96 #93 #95 #90 #264 #267
2024-09-10 10:58:54 +09:30
Jon
94dd555e9b test(core): Tenancy model tests for ticket comment
ref: #250 #96 #93 #95 #90 #264 #267
2024-09-10 10:53:31 +09:30
Jon
10bffe0f0f Merge pull request #266 from nofusscomputing/feat-tickets 2024-09-09 18:00:35 +09:30
Jon
aa6baf94a6 feat(core): support negative numbers when Calculating ticket duration for ticket meta and comments
enables time to be subtracted when negative value added to duration field.

ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 17:59:22 +09:30
Jon
44604d98ab feat(core): Caclulate ticket duration for ticket meta and comments
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 17:36:17 +09:30
Jon
63077dfa26 feat(core): Add edit details to ticket and comments
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 16:39:11 +09:30
Jon
0794e5b58f test(core): ensure history for ticket models is not saved
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 16:13:43 +09:30
Jon
c67e1430bd feat(core): Don't save model history for ticket models
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 16:13:22 +09:30
Jon
f3b249d18f test: Ensure tenancy models save model history
ref: #266 #250
2024-09-09 16:11:40 +09:30
Jon
857b8781cb feat(core): add option to allow the prevention of history saving for tenancy models
ref: #266 #250
2024-09-09 16:10:55 +09:30
Jon
118d41a53b test(core): remove duplicated tenancy object tests for ticket model
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 16:08:16 +09:30
Jon
2cb21ae4a7 test(core): correct triage user test names for allowed field permissions
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 16:07:39 +09:30
Jon
7e0bd630b5 test(core): project field permission check for triage user
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 15:39:37 +09:30
Jon
a57e977131 feat(core): Add project field to tickets allowed fields
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 15:38:41 +09:30
Jon
082a351c17 test(core): Ticket Action comment checks for related tickets
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 14:54:30 +09:30
Jon
a47e1977f0 fix(core): Ensure related tricket action comment is trimmed
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 14:52:39 +09:30
Jon
b0a4d2ca84 test(core): Ticket Action comment checks for subscribing team
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 14:18:48 +09:30
Jon
afceaca736 test(core): Ticket Action comment checks for subscribing user
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 14:18:22 +09:30
Jon
c59dc7d2bf test(core): Ticket Action comment checks for unassigning team
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 14:06:45 +09:30
Jon
e7015570d5 test(core): Ticket Action comment checks for assigning team
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 14:06:17 +09:30
Jon
a68a9e7ef3 fix(core): Team assigned to ticket status update
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 14:05:39 +09:30
Jon
3ea84f008b test(core): Ticket Action comment checks for un-assigning user
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 13:48:09 +09:30
Jon
47aeac846b test(core): Ticket Action comment checks for assigning user
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 13:47:58 +09:30
Jon
69124cff08 chore(core): Remove field '_django_version' from history save
must have been introduced in django 5.0.8

ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 13:44:59 +09:30
Jon
a99c1bb418 refactor(core): REmove constraint on setting user for ticket comment
required so that tests can run. ToDo: add tests to ensure that user is set.

ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 13:44:04 +09:30
Jon
b80ca93ced test(core): Add ticket project field permission check
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 12:13:05 +09:30
Jon
8998292a0f fix(api): ensure ticket_type is set from view var
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-09 12:02:36 +09:30
Jon
bc39b1b8b5 test(core): ensure ticket_type tests dont have change value that matches ticket type
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-08 18:17:24 +09:30
Jon
b93d3d2175 chore: add test to makefile
ref: #266
2024-09-08 18:10:54 +09:30
Jon
b1277c98ab fix(core): Add ticket fields to ticket types
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-08 18:10:31 +09:30
Jon
c2eaf120b6 fix(core): During ticket form validation confirm if value specified/different then default
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-08 18:09:35 +09:30
Jon
41158e495f fix(core): Correctly set the ticket type initial value
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-08 18:05:17 +09:30
Jon
3261342c4f test(core): field based permission tests for add, change, import and triage user
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-08 16:46:17 +09:30
Jon
8b4068ac7e fix(core): prevent import user from having permssions within UI
only allow import user to have API permissions.

ref: #250 #96 #93 #95 #90 #264 #266
2024-09-08 16:41:43 +09:30
Jon
27958f5e7a refactor(core): cache fields allowed during ticket validation
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-08 16:41:31 +09:30
Jon
819dc01451 refactor(core): dont require specifying ticket status
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-08 13:13:36 +09:30
Jon
8277e05205 feat(core): Update ticket status when assigned/unassigned users/teams
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-07 14:33:01 +09:30
Jon
f4d96c78e7 feat(core): Create action comment for subscribed users/teams
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-07 14:32:24 +09:30
Jon
a08d74cd3c feat(core): Create action comment for assigned users/teams
ref: #250 #96 #93 #95 #90 #264 #266
2024-09-07 14:30:22 +09:30
Jon
878d2509cd Merge pull request #265 from nofusscomputing/264-api-refactor-tickets 2024-09-06 18:12:00 +09:30
Jon
09247246bb fix(api): correct ticket view links
ref: #250 #96 #93 #95 #90 #264 #265
2024-09-06 18:01:22 +09:30
Jon
685b8266e4 feat(core): adding of more ticket status icons
ref: #250 #96 #93 #95 #90 #264 #265
2024-09-06 17:58:14 +09:30
Jon
7a2f7fdf3d refactor(core): move id to end for rendered ticket link.
ref: #250 #96 #93 #95 #90 #264 #265
2024-09-06 17:20:32 +09:30
Jon
ecaa24192f fix(core): Correct display of ticket status within ticket interface
ref: #250 #96 #93 #95 #90 #264 #265
2024-09-06 17:10:06 +09:30
Jon
f49cc9c286 refactor(api): Ticket (change, incident, problem and request) to static api endpoints
ref: #250 #96 #93 #95 #90 #264 #265
2024-09-06 16:45:26 +09:30
Jon
53ae19eda8 test(api): Ticket (change, incident, problem and request) api permission checks
ref: #250 #96 #93 #95 #90 #264 #265
2024-09-06 10:26:55 +09:30
Jon
d8361bf741 feat(api): Ticket endpoint dynamic permissions
ref: #250 #96 #93 #95 #90 #264 #265
2024-09-06 10:26:16 +09:30
Jon
d70f04c63d refactor(api): make ticket status field mandatory
ref: #250 #96 #93 #95 #90 #264 #265
2024-09-06 10:25:47 +09:30
Jon
0f4b9fef9e refactor(api): Move core tickets to own ticket endpoints
require so that permissions can be dynamic

ref: #250 #96 #93 #95 #90 #265 closes #264
2024-09-04 11:59:38 +09:30
Jon
05c18702ff Merge pull request #263 from nofusscomputing/250-ticket-tests 2024-09-03 17:51:15 +09:30
Jon
754c311580 feat(core): add ticket status badge
ref: #250 #96 #93 #95 #90 #263
2024-09-03 17:50:41 +09:30
Jon
f6dd5a3156 chore: remove empty settings model
ref: #263
2024-09-03 17:00:46 +09:30
Jon
53489ec43b feat(access): add ability to fetch dynamic permissions
ref: #250 #96 #93 #95 #90 #263
2024-09-03 17:00:22 +09:30
Jon
da8d97a274 test(core): interim ticket unit tests
ref: #250 #96 #93 #95 #90 #263
2024-09-03 16:59:24 +09:30
Jon
8161d67a1f test(itam): Ensure if an attempt to add an existing device via API, it's not recreated and is returned.
ref: #262 #263
2024-09-03 15:22:35 +09:30
Jon
381d59c18f refactor(core): During form validation for a ticket, use defaults if not defined for mandatory fields
ref: #250 #96 #93 #95 #90 #263
2024-09-03 14:56:36 +09:30
Jon
55a40fcf4d refactor(core): Ticket form ticket_type to use class var
ref: #250 #96 #93 #95 #90 #263
2024-09-03 14:56:01 +09:30
Jon
cfc690f1c2 feat(core): Add delete view for ticket types: request, incident, change and problem
ref: #250 #96 #93 #95 #90 #263
2024-09-03 14:54:58 +09:30
Jon
a3bfa921e8 test: correct typo in test description for test_model_add_has_permission
ref: #263
2024-09-03 14:53:23 +09:30
Jon
c670f017a0 fix(api): Ensure if device found it is returned
ref: #262
2024-09-03 13:51:12 +09:30
Jon
f70c5a28af Merge pull request #260 from nofusscomputing/257-ticket-comment-validation 2024-09-03 12:12:47 +09:30
Jon
c3d64a031d feat(api): when attempting to create a device and it's found within DB, dont recreate, return it.
DB matches: name and uuid then name and serial number. first found is returned.

ref: #260 closes #262
2024-09-03 12:07:35 +09:30
Jon
eb94729277 feat(core): When solution comment posted to ticket update status to solved
ref: #250 #96 #93 #95 #90 #257 #260
2024-09-02 16:06:43 +09:30
Jon
c339f17c5c feat(core): Add opened by column to ticket indexes
ref: #250 #96 #93 #95 #90
2024-09-02 15:39:18 +09:30
Jon
d7dd2d6d8b feat(core): permit user to add comment to own ticket
ref: #250 #96 #93 #95 #90 #257
2024-09-02 15:38:49 +09:30
Jon
342fe7da9e fix(core): Ensure status field remains as part of ticket
ref: #250 #96 #93 #95 #90
2024-09-02 15:37:52 +09:30
Jon
910a002201 feat(core): Allow OP to edit own Ticket Comment
ref: #250 #96 #93 #95 #90 closes #257
2024-09-02 15:16:23 +09:30
Jon
5f6c36e823 feat(core): Ticket Comment form submission validation
ref: #250 #96 #93 #95 #90 #257
2024-09-02 14:54:54 +09:30
Jon
cf577bbb4f feat(core): Ticket Comment can be edited by owner
ref: #250 #96 #93 #95 #90 #257
2024-09-02 14:39:38 +09:30
Jon
b8253ae9ba feat(core): Ticket Comment source hidden for non-triage users
ref: #250 #96 #93 #95 #90 #257
2024-09-02 14:39:01 +09:30
Jon
978bcf3b45 refactor(core): cache permission check for ticket types
ref: #250 #96 #93 #95 #90 #257
2024-09-02 14:38:26 +09:30
Jon
f76f81a312 feat(core): When fetching allowed ticket comment fields, check against permissions
ref: #250 #96 #93 #95 #90 #257
2024-09-02 13:39:58 +09:30
Jon
5793295e1a feat(core): pass request to ticket comment form
ref: #250 #96 #93 #95 #90 #257
2024-09-02 13:36:58 +09:30
Jon
6df22314c9 feat(itam): Accept device UUID in any case.
when saving, normalise to lowercase

ref: #260 closes #261
2024-09-02 13:29:29 +09:30
Jon
d7c3e051de refactor(core): Move allowed fields logic to own function
ref: #250 #96 #93 #95 #90 #257
2024-09-02 12:33:54 +09:30
Jon
057a39091d Merge pull request #252 from nofusscomputing/250-ticket-model 2024-09-01 17:12:27 +09:30
Jon
ba8b618b7d chore(core): update validate field permission docstring
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 17:01:29 +09:30
Jon
0b86ded4f5 chore(core): Add Ticket Comment validation class
ref: #250 #252 #96 #93 #95 #90 #115 #257
2024-09-01 16:58:24 +09:30
Jon
523341cf4a docs(core): Add some ticketing docs
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 16:44:52 +09:30
Jon
ee17095a14 chore(core): squash ticket migrations
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 14:40:09 +09:30
Jon
7829f4b7d8 feat(core): Add ticket status icon
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
058e057088 feat(core): Enable ticket comment created date can be set when an import user
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
c8d7b52fbf fix(core): Correct modified field to correct type for ticket comment
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
9732656556 fix(api): Filter ticket comments to match ticket
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
967b9251e2 feat(api): Set default values for ticket comment form to match ticket
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
3ba89a926b fix(core): Correct modified field to correct type
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
b04b6fe645 fix(core): Ensure new ticket can be created
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
1829395a8a fix(core): Add ticket_type field to import_permissions
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
6f2d431ae1 fix(core): Ensure that the organization field is available
ref: #250 #252 #96 #93 #95 #90 #115
2024-09-01 13:52:24 +09:30
Jon
9132608aaf feat(core): render ticket number #\d+ links within markdown
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 17:51:25 +09:30
Jon
f0b604b5dc feat(core): Use common function for markdown rendering for ticket objects
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 16:58:56 +09:30
Jon
d1b9283a9a test: Add view must have function get_initial
organization is set here for tenancy objects

ref: #252
2024-08-31 16:03:28 +09:30
Jon
fe353904d8 test(itam): Refactor Device tests organization field to be editable.
ref: #252
2024-08-31 15:29:40 +09:30
Jon
011a6c156e test: Ensure tests add organization to tenancy objects on creation
ref: #252
2024-08-31 15:28:42 +09:30
Jon
8662feb1c7 feat(api): Ensure device can add/edit organization
ref: #252
2024-08-31 15:27:08 +09:30
Jon
097b3fe8b6 feat(core): Add api validation for ticket
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 14:34:20 +09:30
Jon
7f138d4b68 feat(core): Ensure for tenancy objects that the organization is set
ref: #252
2024-08-31 13:19:49 +09:30
Jon
6532d0e0d7 fix(core): dont remove hidden fields on ticket comment form
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 13:17:32 +09:30
Jon
8242d9f269 fix(core): Correct ticket comment permissions
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 13:17:04 +09:30
Jon
28fe89e048 feat(core): Ticket comment orgaanization set to ticket organization
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 13:16:02 +09:30
Jon
b709839c38 refactor(access): Add definable parameters to organization mixin
ref: #252
2024-08-31 12:25:09 +09:30
Jon
638ea466f0 docs(core): initial docs pages for v1.2
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 11:53:45 +09:30
Jon
31bc1e4e76 fix(access): correct permission check to cater for is_global=None
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 11:25:08 +09:30
Jon
0535674a96 docs(core): document get_dynamic_permissions function
ref: #252
2024-08-31 11:22:13 +09:30
Jon
5f3b12a472 chore(core): clean up ticket css
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-31 11:16:10 +09:30
Jon
6ec16cbeb0 feat(core): colour code related ticket background to ticket type
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-30 18:20:47 +09:30
Jon
1665e519a4 fix(core): return correct redirect path for related ticket form
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-30 15:50:19 +09:30
Jon
95979c6095 feat(core): Validate ticket related and prevent duel related entries
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-30 15:49:42 +09:30
Jon
8b004466d1 feat(core): Validate ticket status field for all ticket types
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-30 15:45:15 +09:30
Jon
3f1f2fd8d4 feat(core): Add ticket action comments on ticket update
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-30 15:00:36 +09:30
Jon
96ed198efc fix(core): use from ticket title for "blocked by"
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-30 12:30:14 +09:30
Jon
6a52730b49 feat(core): Add Title bar to ticket form
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-30 12:23:05 +09:30
Jon
5c4a802017 feat(core): Add field level permission and validation checks
ref: #250 #252 #96 #93 #95 #90 #11
2024-08-28 17:44:41 +09:30
Jon
e59a08b351 refactor(access): cache user_organizations on lookup
ref: #252
2024-08-28 17:39:16 +09:30
Jon
2a7857b60d refactor(access): cache object_organization on lookup
ref: #252
2024-08-28 17:38:29 +09:30
Jon
09afd7f165 feat(core): Add permission checking to Tickets form
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-27 17:18:52 +09:30
Jon
e63bec83e8 feat(access): add dynamic permissions to Tenancy Permissions
ref: #252 #250
2024-08-27 17:09:57 +09:30
Jon
5d74ddfee5 fix(access): Don't query for is_global=None within TenancyManager
ref: #252
2024-08-27 17:05:50 +09:30
Jon
3c44561b19 chore(development): Add makefile
ref: #252 #248
2024-08-26 15:14:04 +09:30
Jon
8edb209d16 feat(api): Add Tickets endpoint
ref: #252 #248
2024-08-26 15:13:12 +09:30
Jon
81bd635ca4 feat(itim): Add Problem ticket to navigation
ref: #250 #252 #93
2024-08-25 17:52:41 +09:30
Jon
6ff3fe5949 feat(itim): Add Incident ticket to navigation
ref: #250 #252 #93
2024-08-25 17:52:20 +09:30
Jon
31067aab95 feat(itim): Add Change ticket to navigation
ref: #250 #252 #90
2024-08-25 17:51:53 +09:30
Jon
7b3a007862 feat(assistance): Add Request ticket to navigation
ref: #250 #252 #96
2024-08-25 17:48:17 +09:30
Jon
c5a5c393a8 feat(core): add basic ticketing system
ref: #250 #252 #96 #93 #95 #90 #115
2024-08-25 17:45:55 +09:30
Jon
52db44eac7 feat(development): add option for including additional stylesheets
ref: #252
2024-08-25 11:31:43 +09:30
Jon
cb9c782d0c chore(base): remove dev apps from debug added urls
ref: #252
2024-08-24 17:03:01 +09:30
Jon
b8c4a540fa fix(core): ensure is_global check does not process null value
ref: #252
2024-08-24 17:00:59 +09:30
Jon
91d85d93c7 chore(core): Add initial comment model file
ref: #252 #250
2024-08-23 18:06:32 +09:30
Jon
73ca0feb55 chore(core): Add initial ticket model file
ref: #252 #250
2024-08-23 18:06:32 +09:30
Jon
64fd8b5686 feat(ui): add project management icon
!31
2024-08-23 18:03:52 +09:30
Jon
58a9532c70 chore: update to cater for recent dev changes and class inheritance
!31 !40 !42
2024-08-23 18:03:52 +09:30
Jon
3c206f5aef feat(project_management): Add manager and users for projects and tasks
!30 #14
2024-08-23 18:03:52 +09:30
Jon
9bc4f186d5 feat(project_management): Project task view "view"
!30 #14
2024-08-23 18:03:52 +09:30
Jon
f883d4190a feat(project_management): Project task edit view
!30 #14
2024-08-23 18:03:52 +09:30
Jon
c6fc2d3e7c feat(project_management): Project task delete view
!30 #14
2024-08-23 18:03:52 +09:30
Jon
e4d1bb4d3c feat(project_management): Project task add view
!30 #14
2024-08-23 18:03:52 +09:30
Jon
376faf3d5a feat(project_management): Add project task model
!30 #14
2024-08-23 18:03:52 +09:30
Jon
6c0ca9cb86 chore(project_management): add urls to include
!30
2024-08-23 18:03:52 +09:30
Jon
326753d0ff chore(project_management): Add doc link to project view page
!30 #14
2024-08-23 18:02:53 +09:30
Jon
47f95ddae2 chore(project_management): add placeholder code for project notes
!30 #14
2024-08-23 18:02:53 +09:30
Jon
86fc1448a6 feat(project_management): save project history
!30 #14
2024-08-23 18:02:53 +09:30
Jon
a91ae337c4 feat(project_management): add project delete page
!30 #14
2024-08-23 18:00:45 +09:30
Jon
58466fa490 feat(project_management): add project edit page
!30 #14
2024-08-23 18:00:45 +09:30
Jon
de78a30a5d feat(project_management): add project view page
!30 #14
2024-08-23 18:00:45 +09:30
Jon
f7d61696d1 feat(project_management): add project add page
!30 #14
2024-08-23 18:00:45 +09:30
Jon
e35ccd360b feat(project_management): add project index page
!30
2024-08-23 18:00:45 +09:30
Jon
5f3a778002 feat(project_management): add interim project model
!30
2024-08-23 18:00:45 +09:30
dcba456af3 build: bump version 1.0.0 -> 1.1.0 2024-08-23 08:26:37 +00:00
Jon
6d98006a37 Merge pull request #210 from nofusscomputing/v1-1 2024-08-23 17:47:59 +09:30
Jon
4ac0c157bc feat(itim): Dont attempt to apply cluster type config if no type specified.
ref: #247 #71
2024-08-23 17:45:44 +09:30
Jon
e696129f0b feat(itim): Service config rendered as part of cluster config
ref: #247 #125 closes #69
2024-08-23 17:45:44 +09:30
Jon
cf5c512a64 feat(itim): dont force config key, validate when it's required
ref: #247 #69
2024-08-23 17:45:44 +09:30
Jon
32f45f2d5f feat(itim): Services assignable to cluster
ref: #247 #125
2024-08-23 17:45:44 +09:30
Jon
66b8bd5a74 feat(itim): Ability to add configuration to cluster type
ref: #247 closes #71
2024-08-23 17:45:44 +09:30
Jon
bfb20dab0f feat(itim): Ability to add external link to cluster
ref: #244 #71 #6
2024-08-23 17:45:44 +09:30
Jon
6b28569bca fix(settings): return the rendering of external links to models
ref: #244
2024-08-23 17:45:44 +09:30
Jon
79b2c668fa docs(itim): cluster user docs
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
5d660694c3 refactor(itim): Add Cluster type to index page
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
e70d0392c0 chore(itim): Add Cluster icon to navigation
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
caa47a3bb6 test(itim): Cluster Types unit tests
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
75203c022a feat(itim): Ability to add and configure Cluster Types
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
b65e577017 chore(itim): add placeholder for assigning service to a cluster
ref: #244 #71 #125
2024-08-23 17:45:44 +09:30
Jon
45ef81481f test(itim): Cluster unit tests
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
f9dee4465b feat(itim): Add cluster to history save
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
8ec1ea2a4c feat(itim): prevent cluster from setting itself as parent
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
17df9d1fa3 fix(core): Ensure when saving history json is correctly formatted
ref: #244
2024-08-23 17:45:44 +09:30
Jon
24967ae3a6 fix(itim): Fix name typo in Add Service button
ref: #244
2024-08-23 17:45:44 +09:30
Jon
30bd8aa483 feat(itim): Ability to add and configure cluster
ref: #244 #71
2024-08-23 17:45:44 +09:30
Jon
efce9c0219 chore: update migrations from previous days work
ref: #244 #71 #245
2024-08-23 17:45:44 +09:30
Jon
0020550dde feat(itam): Track if device is virtual
ref: #244 closes #245
2024-08-23 17:45:44 +09:30
Jon
04a9cde47e feat(api): Endpoint to fetch user permissions
ref: #244 closes #164
2024-08-23 17:45:44 +09:30
Jon
e472022c91 feat(development): Add function to filter permissions to those used by centurion
ref: #244 #164
2024-08-23 17:45:44 +09:30
Jon
d778cd0e83 feat(development): Add new template tag choice_ids for string list casting
Ref: #244 closes #243
2024-08-23 17:45:44 +09:30
Jon
1f76da8709 refactor(itam): Knowledge Base now uses details template
#242 closes #231
2024-08-23 17:45:44 +09:30
Jon
7ddc0abce6 test(itam): Correct Device Type Model permissions test to use "change" view
#242 #234
2024-08-23 17:45:44 +09:30
Jon
a2af58ae09 refactor(itam): Device Type now uses details template
#242 closes #234
2024-08-23 17:45:44 +09:30
Jon
8e71bb932e test(itam): Correct Operating System Model permissions test to use "change" view
#242 #229
2024-08-23 17:45:44 +09:30
Jon
8c1f033b1c refactor(itam): Operating System now uses details template
#242 closes #229
2024-08-23 17:45:44 +09:30
Jon
eb4df77614 refactor(itim): Service Port now uses details template
#242 closes #238
2024-08-23 17:45:44 +09:30
Jon
fed6eee951 test(config_management): Correct Device Model permissions test to use "change" view
#242 #235
2024-08-23 17:45:44 +09:30
Jon
6a0b507c3b refactor(itam): Device Model now uses details template
#242 closes #235
2024-08-23 17:45:44 +09:30
Jon
47b2e61987 test(config_management): Correct Config Group permissions test to use "change" view
#242 #230
2024-08-23 17:45:44 +09:30
Jon
28259b329e refactor(config_management): Config Groups now uses details template
#242 closes #230
2024-08-23 17:45:44 +09:30
Jon
4391aa3ea8 test(itam): Correct Software Category permissions test to use "change" view
#242 #236
2024-08-23 17:45:44 +09:30
Jon
4a4c8e94e4 refactor(itam): Software Categories now uses details template
#242 closes #236
2024-08-23 17:45:44 +09:30
Jon
d41cc312bb test(core): Correct manufacturer permissions test to use "change" view
.#242 #232
2024-08-23 17:45:44 +09:30
Jon
12abc741d2 refactor(itam): manufacturer now uses details template
#242 closes #232
2024-08-23 17:45:44 +09:30
Jon
a8262e0a54 test(itam): Correct software permissions test to use "change" view
#240 #233
2024-08-23 17:45:44 +09:30
Jon
2011c212ba refactor(itam): software now uses details template
#240 closes #233
2024-08-23 17:45:44 +09:30
Jon
564871ca3c chore(itam): remove commented code from device form
#240 closes #227
2024-08-23 17:45:44 +09:30
Jon
95bb15238a fix: Ensure tenancy models have Meta.verbose_name_plural attribute
.#240 closes #239
2024-08-23 17:45:44 +09:30
Jon
cafc5ce6e2 test(model): test for checking if Meta sub-class has variable verbose_name_plural
#239 #240
2024-08-23 17:45:44 +09:30
Jon
68c3b64424 fix(base): Use correct url for back button
.#227 #240
2024-08-23 17:45:44 +09:30
Jon
300fe283d6 refactor(itam): device now use details template
#227 #240
2024-08-23 17:45:44 +09:30
Jon
ac6408c3bb feat(development): Render model_name_plural as part of back button
#227 #239
2024-08-23 17:45:44 +09:30
Jon
750e323947 feat(development): add to form field model_name_plural
#227 #239
2024-08-23 17:45:44 +09:30
Jon
4cca9d9904 feat(development): render heading if section included
#227
2024-08-23 17:45:44 +09:30
Jon
955081f155 chore: add Merge/Pull request template
#226
2024-08-23 17:45:44 +09:30
Jon
01e47c889b docs(roadmap): update completed features
#226
2024-08-23 17:45:43 +09:30
Jon
2cd4d387a7 docs(base): detail view template
. #24 #226 closes #22
2024-08-23 17:45:43 +09:30
Jon
ea8c60ccc5 refactor(itim): services now use details template
. #22 #226
2024-08-23 17:45:43 +09:30
Jon
4ecf5236c1 feat(base): create detail view templates
purpose is to aid in the development of a detail form

#22 #24 #226
2024-08-23 17:45:43 +09:30
Jon
eb919f2d5e docs: initial adding of template page
#22
2024-08-23 17:45:43 +09:30
Jon
485dd43b58 chore: add services navigation icon
!43 #69
2024-08-23 17:45:43 +09:30
Jon
fd4da657fb fix(itim): ensure that the service template config is also rendered as part of device config
!43 #69
2024-08-23 17:45:43 +09:30
Jon
acc6879fb1 docs: fluff the port and services
!43 closes #69
2024-08-23 17:45:43 +09:30
Jon
d339fdb645 fix(itim): dont render link if no device
!43 #69
2024-08-23 17:45:43 +09:30
Jon
53a720a802 feat(itam): Render Service Config with device config
!43 #69
2024-08-23 17:45:43 +09:30
Jon
0b04cdcfbf feat(itam): Display deployed services for devices
!43 #69
2024-08-23 17:45:43 +09:30
Jon
b5d2fe70ff feat(itim): Prevent circular service dependencies
!43 #69
2024-08-23 17:45:43 +09:30
Jon
6d6f1c5401 feat(itim): Port number validation to check for valid port numbers
!43 #69
2024-08-23 17:45:43 +09:30
Jon
7b8b8a6394 feat(itim): Prevent Service template from being assigned as dependent service
!43 #69
2024-08-23 17:45:43 +09:30
Jon
2a3373a19b feat(itim): Add service template support
!43 #69
2024-08-23 17:45:43 +09:30
Jon
eb320c4e95 fix(itim): Dont show self within service dependencies
!43 #69
2024-08-23 17:45:43 +09:30
Jon
0b220424bb feat(itim): Ports for service management
!43 #69
2024-08-23 17:45:43 +09:30
Jon
a948ec7bd7 feat(itim): Service Management
!43 #69
2024-08-23 17:45:43 +09:30
Jon
56196f721d fix(assistance): Only return distinct values when limiting KB articles
!43 #10
2024-08-23 17:45:43 +09:30
Jon
3d06112860 docs(assistance): document kb categories for user
!43 closes #10
2024-08-23 17:45:43 +09:30
Jon
05484d9e02 feat(assistance): Filter KB articles to target user
only intended to filter for users whom dont have change perm.

!43 #10
2024-08-23 17:45:43 +09:30
Jon
b73807a140 feat(assistance): Add date picker to date fields for KB articles
!43 #10
2024-08-23 17:45:43 +09:30
Jon
215c5e464c feat(assistance): Dont display expired articles for "view" users
!43 #10
2024-08-23 17:45:43 +09:30
Jon
cf2dce320c docs(assistance): document kb for user
!43 #10
2024-08-23 17:45:43 +09:30
Jon
32cdcc38b5 feat(base): add code highlighting to markdown
!43 #10
2024-08-23 17:45:43 +09:30
Jon
4b3ea06f70 feat(assistance): Categorised Knowledge base articles
!43 #10
2024-08-23 17:45:43 +09:30
Jon
2e7a6a42b4 docs(assistance): added pages for knowledgebase
!43 #10
2024-08-23 17:45:43 +09:30
Jon
be0ec86c48 chore(base): rename information -> assistance
!43 #10
2024-08-23 17:45:43 +09:30
Jon
8c493e8fa3 feat(itim): Add menu entry
!43 #69 #71
2024-08-23 17:45:43 +09:30
Jon
9668e811c5 feat(itam): Ability to add device configuration
!43 fixes #44
2024-08-23 17:45:43 +09:30
Jon
28ce99f46a test(external_link): add tests
!43 fixes #6
2024-08-23 17:45:43 +09:30
Jon
9b4dbc58f3 feat(settings): New model to allow adding templated links to devices and software
!43 #6
2024-08-23 17:45:43 +09:30
Jon
f295f15034 docs: move settings pages into sub-directory
!43 #6
2024-08-23 17:45:43 +09:30
4c41994068 build: bump version 1.0.0-b14 -> 1.0.0 2024-08-23 08:03:31 +00:00
Jon
6f7b3ffad6 chore: add github pr template
ref: #213
2024-08-20 14:21:00 +09:30
Jon
cc97128e25 ci: add mkdocs workflow
ref: #213
2024-08-20 12:28:43 +09:30
Jon
b6ba3d38dc docs: migrate project links to github
ref: #213
2024-08-20 12:08:59 +09:30
Jon
18b788844a ci: update gitlab-ci to current head
ref: #209
2024-08-19 16:53:31 +09:30
9d5464b5a9 build: bump version 1.0.0-b13 -> 1.0.0-b14 2024-08-12 06:02:07 +00:00
Jon
7848397ae2 Merge pull request #224 from nofusscomputing/223-fix-api-team-mnotes
CRUD operation for team notes
2024-08-12 15:29:21 +09:30
Jon
f298ce94bf test(access): test field model_notes
closes #223
2024-08-12 15:15:28 +09:30
Jon
3cace8943e fix(api): ensure model_notes is an available field
#223
2024-08-12 15:14:58 +09:30
Jon
aa40d68c88 build: add test to changelog
#209
2024-08-11 19:30:45 +09:30
c0f186db89 build: bump version 1.0.0-b12 -> 1.0.0-b13 2024-08-11 08:01:20 +00:00
Jon
6b35e7808c Merge pull request #222 from nofusscomputing/153-model-validations
fix: Audit models for validations
2024-08-11 17:21:20 +09:30
Jon
467f6fca6b fix(itam): Ensure device name is formatted according to RFC1035 2.3.1
see https://datatracker.ietf.org/doc/html/rfc1035#autoid-6

#222 closes #153
2024-08-11 17:09:06 +09:30
Jon
f86b2d5216 fix(itam): Ensure device UUID is correctly formatted
#153 #222
2024-08-11 17:08:56 +09:30
Jon
e29d8e1ec1 fix(config_management): Ensure that config group can't set self as parent
interface already filters self out, however check still to be done.

. #153 #222
2024-08-11 17:07:39 +09:30
Jon
0fc5f41391 fix(settings): ensure that the api token cant be saved to notes field
#153
2024-08-11 16:26:19 +09:30
Jon
4b29448d84 Merge pull request #220 from nofusscomputing/162-api-field-validtion
test: api field checks
2024-08-11 14:37:46 +09:30
Jon
e9fe4896df ci: mirror repo to gitlab
. #220 closes #214
2024-08-11 14:29:02 +09:30
Jon
b9d32a2c16 docs(tests): update testing docs explaining test types
#220 closes #162
2024-08-11 12:57:33 +09:30
Jon
d6bd99c5de docs: update project badges to reflect github hosted project
. #220
2024-08-11 12:38:20 +09:30
Jon
7de5ab12bf docs(readme): correct status badge icon to github
. #220
2024-08-11 12:37:52 +09:30
Jon
3fe09fb8f9 test(software): api field checks
. #162 #220
2024-08-11 12:27:57 +09:30
Jon
eb6b03f731 docs(development): added api field test note
. #220
2024-08-11 12:05:46 +09:30
1667 changed files with 176928 additions and 7909 deletions

View File

@ -1,8 +1,21 @@
---
commitizen:
name: cz_conventional_commits
customize:
change_type_map:
feature: Features
fix: Fixes
refactor: Refactoring
test: Tests
change_type_order:
- BREAKING CHANGE
- feat
- fix
- test
- refactor
commit_parser: ^(?P<change_type>feat|fix|test|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?:\s(?P<message>.*)?
name: cz_customize
prerelease_offset: 1
tag_format: $version
update_changelog_on_bump: false
version: 1.0.0-b12
version: 1.17.0
version_scheme: semver

121
.github/ISSUE_TEMPLATE/new_model.md vendored Normal file
View File

@ -0,0 +1,121 @@
---
name: New Database Model
about: Use when creating a new database model.
title: "New Model - <model table name>"
type: Task
labels: task::feature, triage, type::task
---
<!-- Add an intro -->
<!-- describe a use case if not covered in intro -->
## 📝 Details
<!--
Describe in detail the following:
- New model field
- if foreign key field, what it's name will be or if it's not to be linked ensure specified and coded with `related_name = '+' to disable the link`.
- How the UI will work, be layed out, new ui features etc
- custom permissions if required
-->
## 🚧 Tasks
<!-- Don't remove tasks strike them out. use `~~` before and after the item. i.e. `- ~~[ ] Model Created~~` note: don't include the list dash-->
- [ ] 🆕 [Model Created](https://nofusscomputing.com/projects/centurion_erp/development/models/)
- [ ] 🛠️ Migrations added
- [ ] ♻️ Serializer Created
- [ ] 🔄 [ViewSet Created](https://nofusscomputing.com/projects/centurion_erp/development/views/)
- [ ] 🔗 URL Route Added
- [ ] 🏷️ Model tag added to `app/core/lib/slash_commands/linked_model.CommandLinkedModel.get_model()` function
- [ ] 📘 Tag updated in the [docs](https://nofusscomputing.com/projects/centurion_erp/user/core/markdown/#model-reference)
- [ ] tag added to `app/core/lib/slash_commands/linked_model.CommandLinkedModel.get_model()`
- [ ] ⚒️ Migration _Ticket Linked Item item_type choices update_
>[!note]
> Ensure that when creating the tag the following is adhered to:
> - Two words are not to contain a space char, `\s`. It is to be replaced with an underscore `_`
> - As much as practical, keep the tag as close to the model name as possible
- [ ] 📝 New [History model](https://nofusscomputing.com/projects/centurion_erp/development/core/model_history/) created
- Sub-Models **_ONLY_**
- [ ] Model class variable [`history_app_label`](https://nofusscomputing.com/projects/centurion_erp/development/models/#history) set to correct application label
- [ ] Model class variable [`history_model_name`](https://nofusscomputing.com/projects/centurion_erp/development/models/#history) set to correct model label
- [ ] 📓 New [Notes model](https://nofusscomputing.com/projects/centurion_erp/development/core/model_notes/) created
- [ ] 🆕 Model Created
- [ ] 🛠️ Migrations added
- [ ] Add `app_label` to KB Models `app/assistance/models/model_knowledge_base_article.all_models().model_apps`
- [ ] _(Notes not used/required) -_ Add `model_name` to KB Models `app/assistance/models/model_knowledge_base_article.all_models().excluded_models`
- [ ] 🧪 [Unit tested](https://nofusscomputing.com/projects/centurion_erp/development/core/model_notes/#testing)
- [ ] 🧪 [Functional tested](https://nofusscomputing.com/projects/centurion_erp/development/core/model_notes/#testing)
- [ ] Admin Documentation added/updated _if applicable_
- [ ] Developer Documentation added/updated _if applicable_
- [ ] User Documentation added/updated
---
<!-- Add additional tasks here and as a check box list -->
### 🧪 Tests
- Unit Tests
- [ ] API Render (fields)
- [ ] [Model](https://nofusscomputing.com/projects/centurion_erp/development/models/#tests)
- [ ] ViewSet
- Function Test
- [ ] History API Render (fields)
- [ ] History Entries
- [ ] API Metadata
- [ ] API Permissions
- [ ] Model
- [ ] Serializer
- [ ] ViewSet
## ✅ Requirements
A Requirement is a must have. In addition will also be tested.
- [ ] Must have a [model_tag](https://nofusscomputing.com/projects/centurion_erp/user/core/markdown/#model-reference)
<!--
When detailing requirements the following must be taken into account:
- what the user should be able to do
- what the user should not be able to do
- what should occur when a user performs an action
-->
- Functional Requirements
- Non-Functional Requirements
---
<!-- Add additional requirement here and as a check box list -->

44
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,44 @@
### :books: Summary
<!-- your summary here emojis ref: https://github.com/yodamad/gitlab-emoji -->
### :link: Links / References
<!--
using a list as any links to other references or links as required. if relevant, describe the link/reference
Include any issues or related merge requests. Note: dependent MR's also to be added to "Merge request dependencies"
-->
### :construction_worker: Tasks
- [ ] Add your tasks here if required (delete)
<!-- dont remove tasks below strike through including the checkbox by enclosing in double tidle '~~' -->
- [ ] **Feature Release ONLY** :red_square: [Squash migration files](https://docs.djangoproject.com/en/5.2/topics/migrations/#squashing-migrations) :red_square:
_Multiple migration files created as part of this release are to be sqauashed into a few files as possible so as to limit the number of migrations_
- [ ] :firecracker: Contains breaking-change Any Breaking change(s)?
_Breaking Change must also be notated in the commit that introduces it and in [Conventional Commit Format](https://www.conventionalcommits.org/en/v1.0.0/)._
- [ ] :notebook: Release notes updated
- [ ] :blue_book: Documentation written
_All features to be documented within the correct section(s). Administration, Development and/or User_
- [ ] :checkered_flag: Milestone assigned
- [ ] :gear: :test_tube: [Functional Test(s) Written](https://nofusscomputing.com/projects/centurion_erp/development/testing/)
- [ ] :test_tube: [Unit Test(s) Written](https://nofusscomputing.com/projects/centurion_erp/development/testing/)
_ensure test coverage delta is not less than zero_
- [ ] :page_facing_up: Roadmap updated

View File

@ -10,10 +10,23 @@ on:
tags:
- '*'
env:
GIT_SYNC_URL: "https://${{ secrets.GITLAB_USERNAME_ROBOT }}:${{ secrets.GITLAB_TOKEN_ROBOT }}@gitlab.com/nofusscomputing/projects/centurion_erp.git"
jobs:
mkdocs:
name: 'MKDocs'
permissions:
pull-requests: write
contents: write
statuses: write
checks: write
actions: write
uses: nofusscomputing/action_mkdocs/.github/workflows/reusable_mkdocs.yaml@development
docker:
name: 'Docker'
uses: nofusscomputing/action_docker/.github/workflows/docker.yaml@development
@ -31,3 +44,77 @@ jobs:
uses: nofusscomputing/action_python/.github/workflows/python.yaml@development
secrets:
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
gitlab-mirror:
if: ${{ github.repository == 'nofusscomputing/centurion_erp' }}
runs-on: ubuntu-latest
steps:
- name: Checks
shell: bash
run: |
if [ "0${{ env.GIT_SYNC_URL }}" == "0" ]; then
echo "[ERROR] you must define variable GIT_SYNC_URL for mirroring this repository.";
exit 1;
fi
- name: clone
shell: bash
run: |
git clone --mirror https://github.com/${{ github.repository }} repo;
ls -la repo/
- name: add remote
shell: bash
run: |
cd repo;
echo "**************************************** - git remote -v";
git remote -v;
echo "****************************************";
git remote add destination $GIT_SYNC_URL;
- name: push branches
shell: bash
run: |
cd repo;
echo "**************************************** - git branch";
git branch;
echo "****************************************";
# git push destination --all --force;
git push destination --mirror || true;
# - name: push tags
# shell: bash
# run: |
# cd repo;
# echo "**************************************** - git tag";
# git tag;
# echo "****************************************";
# git push destination --tags --force;

14
.gitignore vendored
View File

@ -1,11 +1,23 @@
venv/**
*/static/**
__pycache__
**.sqlite3
**.sqlite*
**.sqlite
**.coverage
.coverage*
artifacts/
**.tmp.*
volumes/
build/
pages/
node_modules/
.markdownlint-cli2.jsonc
.markdownlint.json
package-lock.json
package.json
**.junit.xml
**.JUnit.xml
feature_flags.json
coverage_*.json
*-coverage.xml
log/

View File

@ -35,3 +35,5 @@
- [ ] [Unit Test(s) Written](https://nofusscomputing.com/projects/centurion_erp/development/testing/)
_ensure test coverage delta is not less than zero_
- [ ] :page_facing_up: Roadmap updated

View File

@ -7,5 +7,6 @@
"streetsidesoftware.code-spell-checker",
"qwtel.sqlite-viewer",
"jebbs.markdown-extended",
"william-voyek.vscode-nginx",
]
}

79
.vscode/launch.json vendored
View File

@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "Debug: Django",
"name": "Centurion",
"type": "debugpy",
"request": "launch",
"args": [
@ -16,9 +16,54 @@
"autoStartBrowser": false,
"program": "${workspaceFolder}/app/manage.py"
},
{
"name": "Debug: Gunicorn",
"type": "debugpy",
"request": "launch",
"module": "gunicorn",
"args": [
"--config=../includes/etc/gunicorn.conf.py",
"--access-logfile",
"-",
"--workers",
"3",
"--bind",
"0.0.0.0:8002",
"app.wsgi:application",
],
"django": true,
"autoStartBrowser": false,
"cwd": "${workspaceFolder}/app",
"env": {
"PROMETHEUS_MULTIPROC_DIR": ""
}
},
{
"name": "Centurion Feature Flag (Management Command)",
"type": "debugpy",
"request": "launch",
"args": [
"feature_flag",
// "0.0.0.0:8002"
],
"django": true,
"autoStartBrowser": false,
"program": "${workspaceFolder}/app/manage.py"
},
{
"name": "Migrate",
"type": "debugpy",
"request": "launch",
"args": [
"migrate"
],
"django": true,
"autoStartBrowser": false,
"program": "${workspaceFolder}/app/manage.py"
},
{
"name": "Debug: Celery",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "celery",
"console": "integratedTerminal",
@ -32,6 +77,34 @@
"debug-itsm@%h"
],
"cwd": "${workspaceFolder}/app"
}
},
{
"name": "Debug pytest (collect)",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"--override-ini", "addopts=",
"--collect-only",
"app",
],
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Python Debugger: Local Attach",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
]
},
]
}

17
.vscode/settings.json vendored
View File

@ -5,16 +5,23 @@
"!python"
],
"python.testing.pytestArgs": [
// "-v",
// "--cov",
// "--cov-report xml",
"app"
"--override-ini", "addopts=",
"app",
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"testing.coverageToolbarEnabled": true,
"cSpell.words": [
"ITSM"
],
"cSpell.language": "en-AU",
"jest.enable": false,
"pylint.enabled": true,
"testing.showCoverageInExplorer": true,
"testing.coverageToolbarEnabled": true,
"testing.coverageBarThresholds": {
"red": 0,
"yellow": 60,
"green": 90
},
"telemetry.feedback.enabled": false,
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,131 @@
# Contribution Guide
Development of this project has been setup to be done from VSCodium. The following additional requirements need to be met:
- npm has been installed. _required for `markdown` linting_
`sudo apt install -y --no-install-recommends npm`
- setup of other requirements can be done with `make prepare`
- **ALL** Linting must pass for Merge to be conducted.
_`make lint`_
## TL;DR
from the root of the project to start a test server use:
``` bash
# activate python venv
source /tmp/centurion_erp/bin/activate
# enter app dir
cd app
# Start dev server can be viewed at http://127.0.0.1:8002
python manage.py runserver 8002
# Run any migrations, if required
python manage.py migrate
# Create a super suer if required
python manage.py createsuperuser
```
## Makefile
!!! tip "TL;DR"
Common make commands are `make prepare` then `make docs` and `make lint`
Included within the root of the repository is a makefile that can be used during development to check/run different items as is required during development. The following make targets are available:
- `prepare`
_prepare the repository. init's all git submodules and sets up a python virtual env and other make targets_
- `docs`
_builds the docs and places them within a directory called build, which can be viewed within a web browser_
- `lint`
_conducts all required linting_
- `docs-lint`
_lints the markdown documents within the docs directory for formatting errors that MKDocs may/will have an issue with._
- `clean`
_cleans up build artifacts and removes the python virtual environment_
> this doc is yet to receive a re-write
## Docker Container
within the `deploy/` directory there is a docker compose file. running `docker compose up` from this directory will launch a full stack deployment locally containing Centurion API, User Interface, a worker and a RabbitMQ server. once launched you can navigate to `http://127.0.0.1/` to start browsing the site.
You may need to run migrations if your not mounting your own DB. to do this run `docker exec -ti centurion-erp python manage.py migrate`
## Page speed tests
to run page speed tests (requires a working prometheus and grafa setup). use the following
``` bash
clear; \
K6_PROMETHEUS_RW_TREND_STATS="p(99),p(95),p(90),max,min" \
K6_PROMETHEUS_RW_SERVER_URL=http://<prometheus url>:9090/api/v1/write \
BASE_URL="http://127.0.0.1:8002" \
AUTH_TOKEN="< api token of superuser>" \
k6 run \
-o experimental-prometheus-rw \
--tag "commit=$(git rev-parse HEAD)" \
--tag "testid=<name of test for ref>" \
test/page_speed.js
```
## Tips / Handy info
- To obtain a list of models _(in in the same order as the file system)_ using the db shell `python3 manage.py dbshell` run the following sql command:
``` sql
SELECT model FROM django_content_type ORDER BY app_label ASC, model ASC;
```
# Old working docs
## Dev Environment
It's advised to setup a python virtual env for development. this can be done with the following commands.
@ -30,6 +155,9 @@ python3 manage.py createsuperuser
# If model changes
python3 manage.py makemigrations --noinput
# To update code highlight run
pygmentize -S default -f html -a .codehilite > project-static/code.css
```
Updates to python modules will need to be captured with SCM. This can be done by running `pip freeze > requirements.txt` from the running virtual environment.

View File

@ -4,7 +4,7 @@
<br>
![Project Status - Active](https://img.shields.io/badge/Project%20Status-Active-green?logo=gitlab&style=plastic)
![Project Status - Active](https://img.shields.io/badge/Project%20Status-Active-green?logo=github&style=plastic)
[![Docker Pulls](https://img.shields.io/docker/pulls/nofusscomputing/centurion-erp?style=plastic&logo=docker&color=0db7ed)](https://hub.docker.com/r/nofusscomputing/centurion-erp) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/centurion-erp)](https://artifacthub.io/packages/container/centurion-erp/centurion-erp)
@ -32,9 +32,14 @@ This project is hosted on [Github](https://github.com/NofussComputing/centurion_
**Stable Branch**
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/nofusscomputing/centurion_erp/ci.yaml?branch=master&style=plastic&logo=github&label=Build&color=%23000) ![GitHub Release](https://img.shields.io/github/v/release/nofusscomputing/centurion_erp?sort=date&style=plastic&logo=github&label=Release&color=000) ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fmaster%2Fbadge_endpoint_coverage.json&style=plastic)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/nofusscomputing/centurion_erp/ci.yaml?branch=master&style=plastic&logo=github&label=Build&color=%23000) ![GitHub Release](https://img.shields.io/github/v/release/nofusscomputing/centurion_erp?sort=date&style=plastic&logo=github&label=Release&color=000)
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fmaster%2Fbadge_endpoint_coverage.json&style=plastic)
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fmaster%2Fbadge_endpoint_unit_test.json)
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fmaster%2Fbadge_endpoint_coverage_functional.json&style=plastic)
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fmaster%2Fbadge_endpoint_functional_test.json)
----
@ -43,9 +48,13 @@ This project is hosted on [Github](https://github.com/NofussComputing/centurion_
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/nofusscomputing/centurion_erp/ci.yaml?branch=development&style=plastic&logo=github&label=Build&color=%23000) ![GitHub Release](https://img.shields.io/github/v/release/nofusscomputing/centurion_erp?include_prereleases&sort=date&style=plastic&logo=github&label=Release&color=000) ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fdevelopment%2Fbadge_endpoint_coverage.json&style=plastic)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/nofusscomputing/centurion_erp/ci.yaml?branch=development&style=plastic&logo=github&label=Build&color=%23000) ![GitHub Release](https://img.shields.io/github/v/release/nofusscomputing/centurion_erp?include_prereleases&sort=date&style=plastic&logo=github&label=Release&color=000)
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fdevelopment%2Fbadge_endpoint_coverage.json&style=plastic)
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fdevelopment%2Fbadge_endpoint_unit_test.json)
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fdevelopment%2Fbadge_endpoint_coverage_functional.json&style=plastic)
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnofusscomputing%2F.github%2Fmaster%2Frepositories%2Fnofusscomputing%2Fcenturion_erp%2Fdevelopment%2Fbadge_endpoint_functional_test.json)
----
<br>

View File

@ -1,7 +1,196 @@
# Version 1.0.0
## Version 1.17.0
- Added setting for log files.
Enables user to specify a default path for centurion's logging. Add the following to your settings file `/etc/itsm/settings.py`
``` py
LOG_FILES = {
"centurion": "/var/log/centurion.log", # Normal Centurion Operations
"weblog": "/var/log/weblog.log", # All web requests made to Centurion
"rest_api": "/var/log/rest_api.log", # Rest API
"catch_all":"/var/log/catch-all.log" # A catch all log. Note: does not log anything that has already been logged.
}
```
With this new setting, the previous setting `LOGGING` will no longer function.
- Renamed `Organization` model to `Tenant` so as to reflect what is actually is.
- `robots.txt` file now being served from the API container at path `/robots.txt` with `User-agent: *` and `Disallow: /`
## Version 1.16.0
- Employees model added behind feature flag `2025-00002` and will remain behind this flag until production ready.
- Ticket and Ticket Comment added behind feature flag `2025-00006` and will remain behind this flag until production ready.
- In preparation of the [Ticket and Ticket Comment model re-write](https://github.com/nofusscomputing/centurion_erp/issues/564)
- Depreciated Change Ticket
- Depreciated Ticket Comment Endpoint
- Depreciated Request Ticket
- Depreciated Incident Ticket
- Depreciated Problem Ticket
- Depreciated Project Task Ticket
These endpoints still work and will remain so until the new Ticket and Ticket Comment Models are production ready.
## Version 1.15.0
- Entities model added behind feature flag `2025-00002` and will remain behind this flag until production ready.
- Roles model added behind feature flag `2025-00003` and will remain behind this flag until production ready.
- Accounting Module added behind feature flag `2025-00004` and will remain behind this flag until production ready.
## Version 1.14.0
- Git Repository and Git Group Models added behind feature flag `2025-00001`. They will remain behind this feature flag until the Git features are fully developed and ready for use.
## Version 1.13.0
- DevOps Module added.
- Feature Flagging Component added as par of the DevOps module.
## Version 1.11.0
**Note:** Migrations should be performed offline. **Failing to perform** an online migration, the option provided below will not be available if the migration crashes. Running the below commands to reset the database for the migrations to re-run will cause data loss if users are making changes to Centurion.
- History views removed from original Centurion interface.
- History views removed from API v1.
- A migration exists that will move the history from the old tables to the new ones.
if for some reason the migration crashes enter the following commands in the dbshell `python manage.py dbshell` and restart the migrations
``` sql
delete from access_organization_history;
delete from access_team_history;
delete from assistance_knowledge_base_history;
delete from assistance_knowledge_base_category_history;
delete from config_management_configgroups_history;
delete from config_management_configgroupsoftware_history;
delete from config_management_configgrouphosts_history;
delete from core_manufacturer_history;
delete from core_ticketcategory_history;
delete from core_ticketcommentcategory_history;
delete from itam_device_history;
delete from itam_devicemodel_history;
delete from itam_devicetype_history;
delete from itam_deviceoperatingsystem_history;
delete from itam_devicesoftware_history;
delete from itam_operatingsystem_history;
delete from itam_operatingsystemversion_history;
delete from itam_software_history;
delete from itam_softwareversion_history;
delete from itam_softwarecategory_history;
delete from itim_cluster_history;
delete from itim_clustertype_history;
delete from itim_port_history;
delete from itim_service_history;
delete from project_management_project_history;
delete from project_management_projectmilestone_history;
delete from project_management_projectstate_history;
delete from project_management_projecttype_history;
delete from settings_externallink_history;
delete from core_model_history;
```
The above commands truncate the data from the new history tables so the migration can run again.
## Version 1.10.0
- Nothing significant to report
## Version 1.9.0
- Nothing significant to report
## Version 1.8.0
- Prometheus exporter added. To enable metrics for the database you will have to update the database backend. see the [docs](https://nofusscomputing.com/projects/centurion_erp/administration/monitoring/#django-exporter-setup) for further information.
## Version 1.5.0
- When v1.4.0 was release the migrations were not merged. As part of the work conducted on this release the v1.4 migrations have been squashed. This should not have any effect on any system that when they updated to v1.4, they ran the migrations and they **completed successfully**. Upgrading from <1.4.0 to this release should also have no difficulties as the migrations required still exist. There are less of them, however with more work per migration.
!!! Note
If you require the previously squashed migrations for what ever reason. Clone the repo and go to commit 17f47040d6737905a1769eee5c45d9d15339fdbf, which is the commit prior to the squashing which is commit ca2da06d2cd393cabb7e172ad47dfb2dd922d952.
## Version 1.4.0
API redesign in preparation for moving the UI out of centurion to it's [own project](https://github.com/nofusscomputing/centurion_erp_ui). This release introduces a **Feature freeze** to the current UI. Only bug fixes will be done for the current UI.
API v2 is a beta release and is subject to change. On completion of the new UI, API v2 will more likely than not be set as stable.
- A large emphasis is being placed upon API stability. This is being achieved by ensuring the following:
- Actions can only be carried out by users whom have the correct permissions
- fields are of the correct type and visible when required as part of the API response
- Data validations work and notify the user of any issue
We are make the above possible by ensuring a more stringent test policy.
- New API will be at path `api/v2`.
- API v1 is now **Feature frozen** with only bug fixes being completed. It's recommended that you move to and start using API v2 as this has feature parity with API v1.
- API v1 is **depreciated**
- Depreciation of **ALL** API urls. API v1 Will be [removed in v2.0.0](https://github.com/nofusscomputing/centurion_erp/issues/343) release of Centurion.
# Version 1.3.0
!!! danger "Security"
As is currently the recommended method of deployment, the Centurion Container must be deployed behind a reverse proxy the conducts the SSL termination.
This release updates the docker container to be a production setup for deployment of Centurion. Prior to this version Centurion ERP was using a development setup for the webserver.
- Docker now uses SupervisorD for container
- Gunicorn WSGI setup for Centurion with NginX as the webserver.
- Container now has a health check.
- To setup container as "Worker", set `IS_WORKER='True'` environmental variable within container. _**Note:** You can still use command `celery -A app worker -l INFO`, although **not** recommended as the container health check will not be functioning_
## Version 1.0.0
Initial Release of Centurion ERP.
## Breaking changes
### Breaking changes
- Nil

View File

@ -1,17 +0,0 @@
[run]
source = .
omit =
*migrations/*
*tests/*/*
[report]
omit =
*/tests/*/*
*/migrations/*
*apps.py
*manage.py
*__init__.py
*asgi*
*wsgi*
*admin.py
*urls.py

View File

@ -1,7 +1,14 @@
import django
from django.contrib import admin
from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin
from .models import *
from access.models.tenant import Tenant as Organization
from access.models.team import Team
from access.models.team_user import TeamUsers
User = django.contrib.auth.get_user_model()
admin.site.unregister(Group)
@ -25,6 +32,40 @@ class OrganizationAdmin(admin.ModelAdmin):
list_filter = ["created"]
search_fields = ["team_name"]
admin.site.register(Organization,OrganizationAdmin)
class TeamUserInline(admin.TabularInline):
model = TeamUsers
extra = 0
readonly_fields = ['created', 'modified']
fields = ['team']
fk_name = 'user'
admin.site.unregister(User)
class UsrAdmin(UserAdmin):
fieldsets = (
(None, {"fields": ("username", "password")}),
("Personal info", {"fields": ("first_name", "last_name", "email")}),
(
"Permissions",
{
"fields": (
"is_active",
"is_staff",
"is_superuser",
),
},
),
("Important dates", {"fields": ("last_login", "date_joined")}),
)
inlines = [TeamUserInline]
admin.site.register(User,UsrAdmin)

View File

@ -1,6 +1,5 @@
from django.db import models
from django.utils.timezone import now
from django.template.defaultfilters import slugify
class AutoCreatedField(models.DateTimeField):
"""
@ -11,12 +10,20 @@ class AutoCreatedField(models.DateTimeField):
"""
help_text = 'Date and time of creation'
verbose_name = 'Created'
def __init__(self, *args, **kwargs):
kwargs.setdefault("editable", False)
kwargs.setdefault("default", now)
kwargs.setdefault("help_text", self.help_text)
kwargs.setdefault("verbose_name", self.verbose_name)
super().__init__(*args, **kwargs)
@ -28,6 +35,18 @@ class AutoLastModifiedField(AutoCreatedField):
"""
help_text = 'Date and time of last modification'
verbose_name = 'Modified'
def __init__(self, *args, **kwargs):
kwargs.setdefault("help_text", self.help_text)
kwargs.setdefault("verbose_name", self.verbose_name)
super().__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value = now()
@ -45,6 +64,20 @@ class AutoSlugField(models.SlugField):
"""
help_text = 'slug for this field'
verbose_name = 'Slug'
def __init__(self, *args, **kwargs):
kwargs.setdefault("help_text", self.help_text)
kwargs.setdefault("verbose_name", self.verbose_name)
super().__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
if not model_instance.slug or model_instance.slug == '_':

View File

@ -1,9 +1,9 @@
from django import forms
from django.db.models import Q
from app import settings
from django.conf import settings
from access.models import Organization
from access.models.tenant import Tenant as Organization
from core.forms.common import CommonModelForm

View File

@ -1,13 +1,13 @@
from django import forms
from django.contrib.auth.models import Permission
from django.db.models import Q
from django.forms import inlineformset_factory
from app import settings
from .team_users import TeamUsersForm, TeamUsers
from access.models import Team
from access.models.team import Team
from access.functions import permissions
from django.conf import settings
from core.forms.common import CommonModelForm
@ -66,37 +66,4 @@ class TeamForm(CommonModelForm):
self.fields['permissions'].widget.attrs = {'style': "height: 200px;"}
apps = [
'access',
'config_management',
'core',
'django_celery_results',
'itam',
'settings',
]
exclude_models = [
'appsettings',
'chordcounter',
'groupresult',
'organization'
'settings',
'usersettings',
]
exclude_permissions = [
'add_organization',
'add_taskresult',
'change_organization',
'change_taskresult',
'delete_organization',
'delete_taskresult',
]
self.fields['permissions'].queryset = Permission.objects.filter(
content_type__app_label__in=apps,
).exclude(
content_type__model__in=exclude_models
).exclude(
codename__in = exclude_permissions
)
self.fields['permissions'].queryset = permissions.permission_queryset()

View File

@ -1,8 +1,8 @@
from django.db.models import Q
from app import settings
from django.conf import settings
from access.models import TeamUsers
from access.models.team_user import TeamUsers
from core.forms.common import CommonModelForm

View File

@ -0,0 +1,61 @@
from django.contrib.auth.models import Permission
def permission_queryset():
"""Filter Permissions to those used within the application
Returns:
list: Filtered queryset that only contains the used permissions
"""
apps = [
'access',
'accounting',
'assistance',
'config_management',
'core',
'devops',
'django_celery_results',
'human_resources',
'itam',
'itim',
'project_management',
'settings',
]
exclude_models = [
'appsettings',
'chordcounter',
'comment',
'groupresult',
'history',
'modelnotes',
'usersettings',
]
exclude_permissions = [
'add_checkin',
'add_history',
'add_organization',
'add_taskresult',
'add_ticketcommentaction',
'change_checkin',
'change_history',
'change_organization',
'change_taskresult',
'change_ticketcommentaction',
'delete_checkin',
'delete_history',
'delete_organization',
'delete_taskresult',
'delete_ticketcommentaction',
'view_checkin',
'view_history',
]
return Permission.objects.select_related('content_type').filter(
content_type__app_label__in=apps,
).exclude(
content_type__model__in=exclude_models
).exclude(
codename__in = exclude_permissions
)

View File

@ -0,0 +1,160 @@
import django
from django.contrib.auth.models import Group
from django.utils.deprecation import MiddlewareMixin
from access.models.tenant import Tenant as Organization
from access.models.team import Team
from settings.models.app_settings import AppSettings
User = django.contrib.auth.get_user_model()
class RequestTenancy(MiddlewareMixin):
"""Access Middleware
Serves the purpose of adding the users tenancy details to rhe request
object.
"""
def process_request(self, request):
request.app_settings = AppSettings.objects.select_related('global_organization').get(
owner_organization = None
)
request.tenancy = Tenancy(user = request.user, app_settings = request.app_settings)
class Tenancy:
user: User = None
groups: list([Group]) = None
_app_settings: AppSettings = None
_user_organizations: list([Organization]) = None
"""Cached User Organizations"""
_user_teams: list([Team]) = None
"""Cached User Teams"""
_user_permissions: list([str]) = None
"""Cached User User Permissions"""
def __init__(self, user: User, app_settings: AppSettings):
self.user = user
self. _app_settings = app_settings
self.groups = user.groups.select_related('team', 'team__organization').prefetch_related('team__permissions__content_type')
self._user_organizations = []
self._user_groups = []
self._user_teams = []
self._user_permissions = []
for group in self.groups:
if group.team not in self._user_teams:
self._user_teams += [ group.team ]
for permission in group.team.permissions.all():
permission_value = str( permission.content_type.app_label + '.' + permission.codename )
if permission_value not in self._user_permissions:
self._user_permissions += [ permission_value ]
if group.team.organization not in self._user_organizations:
self._user_organizations += [ group.team.organization ]
def is_member(self, organization: Organization) -> bool:
"""Returns true if the current user is a member of the organization
iterates over the user_organizations list and returns true if the user is a member
Returns:
bool: _description_
"""
is_member: bool = False
if organization is None:
return False
if int(organization) in self._user_organizations:
is_member = True
return is_member
def has_organization_permission(self, organization: Organization, permissions_required: str) -> bool:
""" Check if user has permission within organization.
Args:
organization (int): Organization to check.
permissions_required (list): if doing object level permissions, pass in required permission.
Returns:
bool: True for yes.
"""
has_permission: bool = False
if type(organization) is not Organization:
raise TypeError('Organization must be of type Organization')
if type(permissions_required) is not str:
raise TypeError('permissions_required must be of type str')
if not organization:
return has_permission
for team in self._user_teams:
if(
team.organization.id == int(organization)
or getattr(self._app_settings.global_organization, 'id', 0) == int(organization)
):
for permission in team.permissions.all():
assembled_permission = str(permission.content_type.app_label) + '.' + str( permission.codename )
if assembled_permission == permissions_required:
has_permission = True
return has_permission

View File

@ -44,7 +44,7 @@ class Migration(migrations.Migration):
('team_name', models.CharField(default='', max_length=50, verbose_name='Name')),
('created', access.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False)),
('modified', access.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False)),
('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists])),
('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists])),
],
options={
'verbose_name_plural': 'Teams',

View File

@ -0,0 +1,89 @@
# Generated by Django 5.1.2 on 2024-12-06 06:47
import access.models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('access', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AlterModelOptions(
name='organization',
options={'ordering': ['name'], 'verbose_name': 'Organization', 'verbose_name_plural': 'Organizations'},
),
migrations.AlterModelOptions(
name='team',
options={'ordering': ['team_name'], 'verbose_name': 'Team', 'verbose_name_plural': 'Teams'},
),
migrations.AlterModelOptions(
name='teamusers',
options={'ordering': ['user'], 'verbose_name': 'Team User', 'verbose_name_plural': 'Team Users'},
),
migrations.AlterField(
model_name='organization',
name='id',
field=models.AutoField(help_text='ID of this item', primary_key=True, serialize=False, unique=True, verbose_name='ID'),
),
migrations.AlterField(
model_name='organization',
name='manager',
field=models.ForeignKey(help_text='Manager for this organization', null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Manager'),
),
migrations.AlterField(
model_name='organization',
name='model_notes',
field=models.TextField(blank=True, default=None, help_text='Tid bits of information', null=True, verbose_name='Notes'),
),
migrations.AlterField(
model_name='organization',
name='name',
field=models.CharField(help_text='Name of this Organization', max_length=50, unique=True, verbose_name='Name'),
),
migrations.AlterField(
model_name='team',
name='is_global',
field=models.BooleanField(default=False, help_text='Is this a global object?', verbose_name='Global Object'),
),
migrations.AlterField(
model_name='team',
name='model_notes',
field=models.TextField(blank=True, default=None, help_text='Tid bits of information', null=True, verbose_name='Notes'),
),
migrations.AlterField(
model_name='team',
name='organization',
field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
),
migrations.AlterField(
model_name='team',
name='team_name',
field=models.CharField(help_text='Name to give this team', max_length=50, verbose_name='Name'),
),
migrations.AlterField(
model_name='teamusers',
name='id',
field=models.AutoField(help_text='ID of this Team User', primary_key=True, serialize=False, unique=True, verbose_name='ID'),
),
migrations.AlterField(
model_name='teamusers',
name='manager',
field=models.BooleanField(blank=True, default=False, help_text='Is this user to be a manager of this team', verbose_name='manager'),
),
migrations.AlterField(
model_name='teamusers',
name='team',
field=models.ForeignKey(help_text='Team user belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='team', to='access.team', verbose_name='Team'),
),
migrations.AlterField(
model_name='teamusers',
name='user',
field=models.ForeignKey(help_text='User who will be added to the team', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User'),
),
]

View File

@ -0,0 +1,49 @@
# Generated by Django 5.1.5 on 2025-02-09 11:07
import access.models
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('access', '0002_alter_organization_options_alter_team_options_and_more'),
('core', '0012_modelnotes'),
]
operations = [
migrations.AlterField(
model_name='team',
name='organization',
field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.team.Team.validatate_organization_exists], verbose_name='Organization'),
),
migrations.CreateModel(
name='OrganizationNotes',
fields=[
('modelnotes_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelnotes')),
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='access.organization', verbose_name='Model')),
],
options={
'verbose_name': 'Organization Note',
'verbose_name_plural': 'Organization Notes',
'db_table': 'access_organization_notes',
'ordering': ['-created'],
},
bases=('core.modelnotes',),
),
migrations.CreateModel(
name='TeamNotes',
fields=[
('modelnotes_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelnotes')),
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='access.team', verbose_name='Model')),
],
options={
'verbose_name': 'Team Note',
'verbose_name_plural': 'Team Notes',
'db_table': 'access_team_notes',
'ordering': ['-created'],
},
bases=('core.modelnotes',),
),
]

View File

@ -0,0 +1,43 @@
# Generated by Django 5.1.5 on 2025-02-20 13:25
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('access', '0003_alter_team_organization_organizationnotes_teamnotes'),
('core', '0015_modelhistory_manufacturerhistory_and_more'),
]
operations = [
migrations.CreateModel(
name='OrganizationHistory',
fields=[
('modelhistory_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelhistory')),
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='history', to='access.organization', verbose_name='Model')),
],
options={
'verbose_name': 'Organization History',
'verbose_name_plural': 'Organization History',
'db_table': 'access_organization_history',
'ordering': ['-created'],
},
bases=('core.modelhistory',),
),
migrations.CreateModel(
name='TeamHistory',
fields=[
('modelhistory_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelhistory')),
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='history', to='access.team', verbose_name='Model')),
],
options={
'verbose_name': 'Team History',
'verbose_name_plural': 'Team History',
'db_table': 'access_team_history',
'ordering': ['-created'],
},
bases=('core.modelhistory',),
),
]

View File

@ -0,0 +1,140 @@
# Generated by Django 5.2 on 2025-04-10 02:34
import access.fields
import access.models.tenancy
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('access', '0004_organizationhistory_teamhistory'),
('auth', '0012_alter_user_first_name_max_length'),
('core', '0021_alter_ticketlinkeditem_item_type'),
]
operations = [
migrations.CreateModel(
name='Entity',
fields=[
('is_global', models.BooleanField(default=False, help_text='Is this a global object?', verbose_name='Global Object')),
('model_notes', models.TextField(blank=True, default=None, help_text='Tid bits of information', null=True, verbose_name='Notes')),
('id', models.AutoField(help_text='Primary key of the entry', primary_key=True, serialize=False, unique=True, verbose_name='ID')),
('entity_type', models.CharField(default='entity', help_text='Type this entity is', max_length=30, verbose_name='Entity Type')),
('created', access.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, help_text='Date and time of creation', verbose_name='Created')),
('modified', access.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, help_text='Date and time of last modification', verbose_name='Modified')),
('organization', models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.organization', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Organization')),
],
options={
'verbose_name': 'Entity',
'verbose_name_plural': 'Entities',
'ordering': ['created', 'modified', 'organization'],
},
),
migrations.CreateModel(
name='Person',
fields=[
('entity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='access.entity')),
('f_name', models.CharField(help_text='The persons first name', max_length=64, verbose_name='First Name')),
('m_name', models.CharField(blank=True, default=None, help_text='The persons middle name(s)', max_length=100, null=True, verbose_name='Middle Name(s)')),
('l_name', models.CharField(help_text='The persons Last name', max_length=64, verbose_name='Last Name')),
('dob', models.DateField(blank=True, default=None, help_text='The Persons Date of Birth (DOB)', null=True, verbose_name='DOB')),
],
options={
'verbose_name': 'Person',
'verbose_name_plural': 'People',
'ordering': ['l_name', 'm_name', 'f_name', 'dob'],
},
bases=('access.entity',),
),
migrations.CreateModel(
name='EntityHistory',
fields=[
('modelhistory_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelhistory')),
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='history', to='access.entity', verbose_name='Model')),
],
options={
'verbose_name': 'Entity History',
'verbose_name_plural': 'Entity History',
'db_table': 'access_entity_history',
'ordering': ['-created'],
},
bases=('core.modelhistory',),
),
migrations.CreateModel(
name='EntityNotes',
fields=[
('modelnotes_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelnotes')),
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='access.entity', verbose_name='Model')),
],
options={
'verbose_name': 'Entity Note',
'verbose_name_plural': 'Entity Notes',
'db_table': 'access_entity_notes',
'ordering': ['-created'],
},
bases=('core.modelnotes',),
),
migrations.CreateModel(
name='Role',
fields=[
('model_notes', models.TextField(blank=True, default=None, help_text='Tid bits of information', null=True, verbose_name='Notes')),
('id', models.AutoField(help_text='Primary key of the entry', primary_key=True, serialize=False, unique=True, verbose_name='ID')),
('name', models.CharField(help_text='Name of this role', max_length=30, verbose_name='Name')),
('created', access.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, help_text='Date and time of creation', verbose_name='Created')),
('modified', access.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, help_text='Date and time of last modification', verbose_name='Modified')),
('organization', models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.organization', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Organization')),
('permissions', models.ManyToManyField(blank=True, help_text='Permissions part of this role', related_name='roles', to='auth.permission', verbose_name='Permissions')),
],
options={
'verbose_name': 'Role',
'verbose_name_plural': 'Roles',
'ordering': ['organization', 'name'],
'unique_together': {('organization', 'name')},
},
),
migrations.CreateModel(
name='RoleHistory',
fields=[
('modelhistory_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelhistory')),
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='history', to='access.role', verbose_name='Model')),
],
options={
'verbose_name': 'Role History',
'verbose_name_plural': 'Role History',
'db_table': 'access_role_history',
'ordering': ['-created'],
},
bases=('core.modelhistory',),
),
migrations.CreateModel(
name='RoleNotes',
fields=[
('modelnotes_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelnotes')),
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='access.role', verbose_name='Model')),
],
options={
'verbose_name': 'Role Note',
'verbose_name_plural': 'Role Notes',
'db_table': 'access_role_notes',
'ordering': ['-created'],
},
bases=('core.modelnotes',),
),
migrations.CreateModel(
name='Contact',
fields=[
('person_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='access.person')),
('directory', models.BooleanField(blank=True, default=True, help_text='Show contact details in directory', verbose_name='Show in Directory')),
('email', models.EmailField(help_text='E-mail address for this person', max_length=254, unique=True, verbose_name='E-Mail')),
],
options={
'verbose_name': 'Contact',
'verbose_name_plural': 'Contacts',
'ordering': ['email'],
},
bases=('access.person',),
),
]

View File

@ -0,0 +1,25 @@
# Generated by Django 5.1.9 on 2025-05-14 11:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('access', '0005_entity_person_entityhistory_entitynotes_role_and_more'),
('assistance', '0005_knowledgebasecategoryhistory_knowledgebasehistory'),
('config_management', '0007_configgroupshistory_configgrouphostshistory_and_more'),
('core', '0022_ticketcommentbase_ticketbase_ticketcommentsolution_and_more'),
('devops', '0011_alter_gitgroup_unique_together_and_more'),
('itam', '0010_alter_software_organization'),
('itim', '0009_slmticket_requestticket'),
('project_management', '0005_projecthistory_projectmilestonehistory_and_more'),
('settings', '0011_appsettingshistory_externallinkhistory'),
]
operations = [
migrations.RenameModel(
old_name = 'Organization',
new_name = 'Tenant'
),
]

View File

@ -0,0 +1,47 @@
# Generated by Django 5.1.9 on 2025-05-14 13:48
import access.models.team
import access.models.tenancy
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('access', '0007_rename_organization_tenant'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AlterModelOptions(
name='tenant',
options={'ordering': ['name'], 'verbose_name': 'Tenant', 'verbose_name_plural': 'Tenants'},
),
migrations.AlterField(
model_name='entity',
name='organization',
field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
),
migrations.AlterField(
model_name='role',
name='organization',
field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
),
migrations.AlterField(
model_name='team',
name='organization',
field=models.ForeignKey(help_text='Tenant this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.tenant', validators=[access.models.team.Team.validatate_organization_exists], verbose_name='Tenant'),
),
migrations.AlterField(
model_name='tenant',
name='manager',
field=models.ForeignKey(help_text='Manager for this Tenancy', null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Manager'),
),
migrations.AlterField(
model_name='tenant',
name='name',
field=models.CharField(help_text='Name of this Tenancy', max_length=50, unique=True, verbose_name='Name'),
),
]

View File

@ -0,0 +1,135 @@
from django.contrib.auth.models import ContentType, Permission
from django.db import migrations
from access.models.team import Team
ContentType.DoesNotExist
def add_tenancy_permissions(apps, schema_editor):
print('')
print(f"Begin permission migration for rename of Organization to Tenant.")
try:
add_permission = Permission.objects.get(
codename = 'add_tenant',
content_type = ContentType.objects.get(
app_label = 'access',
model = 'tenant',
)
)
change_permission = Permission.objects.get(
codename = 'change_tenant',
content_type = ContentType.objects.get(
app_label = 'access',
model = 'tenant',
)
)
delete_permission = Permission.objects.get(
codename = 'delete_tenant',
content_type = ContentType.objects.get(
app_label = 'access',
model = 'tenant',
)
)
view_permission = Permission.objects.get(
codename = 'view_tenant',
content_type = ContentType.objects.get(
app_label = 'access',
model = 'tenant',
)
)
print(f' Searching for Teams.')
teams = Team.objects.select_related('group_ptr__permissions')
print(f'Found {str(len(teams))} Teams.')
for team in teams:
print(f' Processing Team {str(team.team_name)}.')
permissions = team.group_ptr.permissions.all()
print(f' Searching for Organization Permissions.')
print(f' Found {str(len(permissions))} Permissions.')
for permission in permissions:
if '_organization' not in permission.codename:
continue
action = str(permission.codename).split('_')[0]
print(f' Found Organization Permission {str(action)}')
if action == 'add':
team.group_ptr.permissions.add( add_permission )
print(f' Add Tenant Permission {str(action)}')
team.group_ptr.permissions.remove( permission )
print(f' Remove Organization Permission {str(action)}')
elif action == 'change':
team.group_ptr.permissions.add( change_permission )
print(f' Add Tenant Permission {str(action)}')
team.group_ptr.permissions.remove( permission )
print(f' Remove Organization Permission {str(action)}')
elif action == 'delete':
team.group_ptr.permissions.add( delete_permission )
print(f' Add Tenant Permission {str(action)}')
team.group_ptr.permissions.remove( permission )
print(f' Remove Organization Permission {str(action)}')
elif action == 'view':
team.group_ptr.permissions.add( view_permission )
print(f' Add Tenant Permission {str(action)}')
team.group_ptr.permissions.remove( permission )
print(f' Remove Organization Permission {str(action)}')
print(f' Completed Team {str(team.team_name)}.')
except ContentType.DoesNotExist:
# DB is new so no content types. no migration to be done.
pass
print(' Permission Migration Actions Complete.')
class Migration(migrations.Migration):
dependencies = [
('access', '0008_alter_tenant_options_alter_entity_organization_and_more'),
]
operations = [
migrations.RunPython(add_tenancy_permissions),
]

View File

@ -0,0 +1,43 @@
# Generated by Django 5.1.9 on 2025-05-16 09:58
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('access', '0009_migrate_organization_permission_tenant'),
]
operations = [
migrations.CreateModel(
name='Company',
fields=[
('entity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='access.entity')),
('name', models.CharField(help_text='The name of this entity', max_length=80, verbose_name='Name')),
],
options={
'verbose_name': 'Company',
'verbose_name_plural': 'Companies',
'ordering': ['name'],
'sub_model_type': 'company',
},
bases=('access.entity',),
),
migrations.AlterField(
model_name='entity',
name='entity_type',
field=models.CharField(help_text='Type this entity is', max_length=30, verbose_name='Entity Type'),
),
migrations.AlterField(
model_name='person',
name='dob',
field=models.DateField(blank=True, help_text='The Persons Date of Birth (DOB)', null=True, verbose_name='DOB'),
),
migrations.AlterField(
model_name='person',
name='m_name',
field=models.CharField(blank=True, help_text='The persons middle name(s)', max_length=100, null=True, verbose_name='Middle Name(s)'),
),
]

View File

@ -0,0 +1,30 @@
# Generated by Django 5.1.9 on 2025-05-17 17:50
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('access', '0010_company_alter_entity_entity_type_alter_person_dob_and_more'),
('core', '0026_rename_manufacturerhistory_manufactureraudithistory'),
]
operations = [
migrations.RenameModel(
old_name='EntityHistory',
new_name='EntityAuditHistory',
),
migrations.RenameModel(
old_name='OrganizationHistory',
new_name='OrganizationAuditHistory',
),
migrations.RenameModel(
old_name='RoleHistory',
new_name='RoleAuditHistory',
),
migrations.RenameModel(
old_name='TeamHistory',
new_name='TeamAuditHistory',
),
]

View File

@ -1,15 +1,30 @@
from django.contrib.auth.mixins import AccessMixin, PermissionRequiredMixin
from django.contrib.auth.mixins import AccessMixin
from django.contrib.auth.models import Group
from django.core.exceptions import PermissionDenied
from django.utils.functional import cached_property
from .models import Organization, Team
from access.models.tenant import Tenant as Organization
from access.models.team import Team
class OrganizationMixin():
"""Base Organization class"""
parent_model: str = None
""" Parent Model
This attribute defines the parent model for the model in question. The parent model when defined
will be used as the object to obtain the permissions from.
"""
parent_model_pk_kwarg: str = 'pk'
"""Parent Model kwarg
This value is used to define the kwarg that is used as the parent objects primary key (pk).
"""
request = None
user_groups = []
@ -26,20 +41,24 @@ class OrganizationMixin():
parent_model (Model): with PK from kwargs['pk']
"""
return self.parent_model.objects.get(pk=self.kwargs['pk'])
return self.parent_model.objects.get(pk=self.kwargs[self.parent_model_pk_kwarg])
def object_organization(self) -> int:
id = None
if hasattr(self, '_object_organization'):
return int(self._object_organization)
try:
if hasattr(self, 'get_queryset'):
self.get_queryset()
if hasattr(self, 'parent_model'):
if self.parent_model:
obj = self.get_parent_obj()
id = obj.get_organization().id
@ -61,6 +80,10 @@ class OrganizationMixin():
id = 0
if hasattr(self, 'instance') and id is None: # Form Instance
id = self.instance.get_organization()
except AttributeError:
@ -84,6 +107,10 @@ class OrganizationMixin():
pass
if id is not None:
self._object_organization = id
return id
@ -99,9 +126,13 @@ class OrganizationMixin():
is_member = False
if organization in self.user_organizations():
if organization is None:
return True
return False
if int(organization) in self.user_organizations():
is_member = True
return is_member
@ -111,6 +142,10 @@ class OrganizationMixin():
Override of 'PermissionRequiredMixin' method so that this mixin can obtain the required permission.
"""
if not hasattr(self, 'permission_required'):
return []
if self.permission_required is None:
raise ImproperlyConfigured(
f"{self.__class__.__name__} is missing the "
@ -147,6 +182,10 @@ class OrganizationMixin():
user_organizations = []
if hasattr(self, '_user_organizations'):
return self._user_organizations
teams = Team.objects
for group in self.request.user.groups.all():
@ -157,18 +196,41 @@ class OrganizationMixin():
user_organizations = user_organizations + [team.organization.id]
if len(user_organizations) > 0:
self._user_organizations = user_organizations
return user_organizations
# ToDo: Ensure that the group has access to item
def has_organization_permission(self, organization: int=None) -> bool:
def has_organization_permission(self, organization: int = None, permissions_required: list = None) -> bool:
""" Check if user has permission within organization.
Args:
organization (int, optional): Organization to check. Defaults to None.
permissions_required (list, optional): if doing object level permissions, pass in required permission. Defaults to None.
Returns:
bool: True for yes.
"""
has_permission = False
if permissions_required is None:
permissions_required = self.get_permission_required()
if not organization:
organization = self.object_organization()
else:
organization = int(organization)
if self.is_member(organization) or organization == 0:
groups = Group.objects.filter(pk__in=self.user_groups)
@ -182,7 +244,7 @@ class OrganizationMixin():
assembled_permission = str(permission["content_type__app_label"]) + '.' + str(permission["codename"])
if assembled_permission in self.get_permission_required() and (team['organization_id'] == organization or organization == 0):
if assembled_permission in permissions_required and (team['organization_id'] == organization or organization == 0):
return True
@ -198,7 +260,7 @@ class OrganizationMixin():
self.permission_required = permissions_required
organization_manager_models = [
'access.organization',
'access.tenant',
'access.team',
'access.teamusers',
]
@ -242,21 +304,29 @@ class OrganizationMixin():
return True
perms = self.get_permission_required()
if permissions_required:
if self.has_organization_permission():
perms = permissions_required
else:
perms = self.get_permission_required()
if self.has_organization_permission(permissions_required = perms):
return True
if self.request.user.has_perms(perms) and len(self.kwargs) == 0 and str(self.request.method).lower() == 'get':
if self.request.user.has_perms(perms) and str(self.request.method).lower() == 'get':
return True
if len(self.kwargs) == 0 or (len(self.kwargs) == 1 and 'ticket_type' in self.kwargs):
return True
for required_permission in self.permission_required:
if required_permission.replace(
'view_', ''
) == 'access.organization' and len(self.kwargs) == 0:
) == 'access.tenant' and len(self.kwargs) == 0:
return True
@ -327,6 +397,12 @@ class OrganizationPermission(AccessMixin, OrganizationMixin):
if not request.user.is_authenticated:
return self.handle_no_permission()
if len(self.permission_required) == 0:
if hasattr(self, 'get_dynamic_permissions'):
self.permission_required = self.get_dynamic_permissions()
if len(self.permission_required) > 0:

View File

@ -0,0 +1,274 @@
import django
from django.db import models
from access.models.tenant import Tenant as Organization
User = django.contrib.auth.get_user_model()
class OrganizationMixin:
"""Organization Tenancy Mixin
This class is intended to be included in **ALL** View / Viewset classes as
it contains the functions/methods required to conduct the permission
checking.
"""
_obj_organization: int = None
"""Cached Object Organization"""
def get_obj_organization(self, obj = None, request = None) -> Organization:
"""Fetch the objects Organization
Args:
obj (Model): Model of object
Raises:
ValueError: When `obj` and `request` are both missing
Returns:
Organization: Organization the object is from
None: No Organization was found
"""
if obj is None and request is None:
raise ValueError('Missing Parameter. obj or request must be supplied')
if self._obj_organization:
return self._obj_organization
if obj:
self._obj_organization = getattr(obj, 'organization', None)
if not self._obj_organization:
self._obj_organization = getattr(obj, 'get_organization', lambda: None)()
elif (
request
and not self.kwargs.get('pk', None)
):
if getattr(request.stream, 'method', '') != 'DELETE':
data = getattr(request, 'data', None)
if data:
data_organization = self.kwargs.get('organization_id', None)
if not data_organization:
data_organization = request.data.get('organization_id', None)
if not data_organization:
data_organization = request.data.get('organization', None)
if data_organization:
self._obj_organization = Organization.objects.get(
pk = int( data_organization )
)
elif self.kwargs.get('pk', None):
obj = self.model.objects.get( pk = self.kwargs.get('pk', None) )
if getattr(obj, 'organization', None):
self._obj_organization = obj.organization
elif str(self.model._meta.verbose_name).lower() == 'tenant':
self._obj_organization = obj
if self.get_parent_model(): # if defined is to overwrite object organization
parent_obj = self.get_parent_obj()
self._obj_organization = parent_obj.get_organization()
return self._obj_organization
def get_parent_model(self):
"""Get the Parent Model
This function exists so that dynamic parent models can be defined.
They are defined by overriding this method.
Returns:
Model: Parent Model
"""
return self.parent_model
def get_parent_obj(self):
""" Get the Parent Model Object
Use in views where the the model has no organization and the organization should be fetched from the parent model.
Requires attribute `parent_model` within the view with the value of the parent's model class
Returns:
parent_model (Model): with PK from kwargs['pk']
"""
return self.get_parent_model().objects.get(pk=self.kwargs[self.parent_model_pk_kwarg])
def get_permission_organizations(self, permission: str ) -> list([ int ]):
"""Return Organization(s) the permission belongs to
Searches the users organizations for the required permission, if found
the organization is added to the list to return.
Args:
permission (str): Permission to search users organizations for
Returns:
Organizations (list): All Organizations where the permission was found.
"""
_permission_organizations: list = []
for team in self.request.tenancy._user_teams:
for team_permission in team.permissions.all():
permission_value = str( team_permission.content_type.app_label + '.' + team_permission.codename )
if permission_value == permission:
_permission_organizations += [ team.organization.id ]
return _permission_organizations
_permission_required: str = None
"""Cached Permissions required"""
def get_permission_required(self) -> str:
""" Get / Generate Permission Required
If there is a requirement that there be custom/dynamic permissions,
this function can be safely overridden.
Raises:
ValueError: Unable to determin the view action
Returns:
str: Permission in format `<app_name>.<action>_<model_name>`
"""
if self._permission_required:
return self._permission_required
if hasattr(self, 'get_dynamic_permissions'):
self._permission_required = self.get_dynamic_permissions()
if type(self._permission_required) is list:
self._permission_required = self._permission_required[0]
return self._permission_required
view_action: str = None
if(
self.action == 'create'
or getattr(self.request._stream, 'method', '') == 'POST'
):
view_action = 'add'
elif (
self.action == 'partial_update'
or self.action == 'update'
or getattr(self.request._stream, 'method', '') == 'PATCH'
or getattr(self.request._stream, 'method', '') == 'PUT'
):
view_action = 'change'
elif(
self.action == 'destroy'
or getattr(self.request._stream, 'method', '') == 'DELETE'
):
view_action = 'delete'
elif (
self.action == 'list'
):
view_action = 'view'
elif self.action == 'retrieve':
view_action = 'view'
elif self.action == 'metadata':
view_action = 'view'
elif self.action is None:
return False
if view_action is None:
raise ValueError('view_action could not be defined.')
permission = self.model._meta.app_label + '.' + view_action + '_' + self.model._meta.model_name
permission_required = permission
self._permission_required = permission_required
return self._permission_required
parent_model: models.Model = None
""" Parent Model
This attribute defines the parent model for the model in question. The parent model when defined
will be used as the object to obtain the permissions from.
"""
parent_model_pk_kwarg: str = 'pk'
"""Parent Model kwarg
This value is used to define the kwarg that is used as the parent objects primary key (pk).
"""

View File

@ -0,0 +1,319 @@
import traceback
from rest_framework.permissions import DjangoObjectPermissions
from access.models.tenancy import Tenant, TenancyObject
from core import exceptions as centurion_exceptions
class OrganizationPermissionMixin(
DjangoObjectPermissions,
):
"""Tenant Permission Mixin
This class is to be used as the permission class for API `Views`/`ViewSets`.
In combination with the `TenantPermissionsMixin`, permission checking
will be done to ensure the user has the correct permissions to perform the
CRUD operation.
**Note:** If the user is not authenticated, they will be denied access
globally.
Permissions are broken down into two areas:
- `Tenancy` Objects
This object requires that the user have the correct permission and that
permission be assigned within the organiztion the object belongs to.
- `Non-Tenancy` Objects.
This object requires the the use have the correct permission assigned,
regardless of the organization the object is from. This includes objects
that have no organization.
"""
_is_tenancy_model: bool = None
def is_tenancy_model(self, view) -> bool:
"""Determin if the Model is a `Tenancy` Model
Will look at the model defined within the view unless a parent
model is found. If the latter is true, the parent_model will be used to
determin if the model is a `Tenancy` model
Args:
view (object): The View the HTTP request was mad to
Returns:
True (bool): Model is a Tenancy Model.
False (bool): Model is not a Tenancy model.
"""
if not self._is_tenancy_model:
if hasattr(view, 'model'):
self._is_tenancy_model = issubclass(view.model, TenancyObject)
if view.get_parent_model():
self._is_tenancy_model = issubclass(view.get_parent_model(), TenancyObject)
return self._is_tenancy_model
def has_permission(self, request, view):
""" Check if user has the required permission
Permission flow is as follows:
- Un-authenticated users. Access Denied
- Authenticated user whom make a request using wrong method. Access
Denied
- Authenticated user who is not in same organization as object. Access
Denied
- Authenticated user who is in same organization as object, however is
missing the correct permission. Access Denied
Depending upon user type, they will recieve different feedback. In order
they are:
- Non-authenticated users will **always** recieve HTTP/401
- Authenticated users who use an unsupported method, HTTP/405
- Authenticated users missing the correct permission recieve HTTP/403
Args:
request (object): The HTTP Request Object
view (_type_): The View/Viewset Object the request was made to
Raises:
PermissionDenied: User does not have the required permission.
NotAuthenticated: User is not logged into Centurion.
ValueError: Could not determin the view action.
Returns:
True (bool): User has the required permission.
False (bool): User does not have the required permission
"""
if request.user.is_anonymous:
raise centurion_exceptions.NotAuthenticated()
try:
if (
(
view.model.__name__ == 'UserSettings'
and request._user.id == int(view.kwargs.get('pk', 0))
)
or (
view.model.__name__ == 'AuthToken'
and request._user.id == int(view.kwargs.get('model_id', 0))
)
):
return True
elif (
(
view.model.__name__ == 'UserSettings'
and request._user.id != int(view.kwargs.get('pk', 0))
)
or (
view.model.__name__ == 'AuthToken'
and request._user.id != int(view.kwargs.get('model_id', 0))
)
):
return False
has_permission_required: bool = False
user_permissions = request.tenancy._user_permissions
permission_required = view.get_permission_required()
if permission_required and user_permissions:
# No permission_required couldnt get permissions
# No user_permissions, user missing the required permission
has_permission_required: bool = permission_required in user_permissions
if request.method not in view.allowed_methods:
raise centurion_exceptions.MethodNotAllowed(method = request.method)
elif not has_permission_required and not request.user.is_superuser:
raise centurion_exceptions.PermissionDenied()
obj_organization: Tenant = view.get_obj_organization(
request = request
)
view_action: str = None
if(
view.action == 'create'
and request.method == 'POST'
):
view_action = 'add'
elif(
view.action == 'destroy'
and request.method == 'DELETE'
):
view_action = 'delete'
elif (
view.action == 'list'
):
view_action = 'view'
elif (
view.action == 'partial_update'
and request.method == 'PATCH'
):
view_action = 'change'
elif (
view.action == 'update'
and request.method == 'PUT'
):
view_action = 'change'
elif(
view.action == 'retrieve'
and request.method == 'GET'
):
view_action = 'view'
elif(
view.action == 'metadata'
and request.method == 'OPTIONS'
):
return True
if view_action is None:
raise ValueError('view_action could not be defined.')
if obj_organization is None or request.user.is_superuser:
return True
elif obj_organization is not None:
if request.tenancy.has_organization_permission(
organization = obj_organization,
permissions_required = view.get_permission_required()
):
return True
except ValueError as e:
# ToDo: This exception could be used in traces as it provides
# information as to dodgy requests. This exception is raised
# when the method does not match the view action.
print(traceback.format_exc())
except centurion_exceptions.Http404 as e:
# This exception genrally means that the user is not in the same
# organization as the object as objects are filtered to users
# organizations ONLY.
pass
except centurion_exceptions.ObjectDoesNotExist as e:
# This exception genrally means that the user is not in the same
# organization as the object as objects are filtered to users
# organizations ONLY.
pass
except centurion_exceptions.PermissionDenied as e:
# This Exception will be raised after this function has returned
# False.
pass
return False
def has_object_permission(self, request, view, obj):
try:
if request.user.is_anonymous:
return False
if (
(
view.model.__name__ == 'UserSettings'
and request._user.id == int(view.kwargs.get('pk', 0))
)
or (
view.model.__name__ == 'AuthToken'
and request._user.id == int(view.kwargs.get('model_id', 0))
)
):
return True
object_organization = view._obj_organization
if object_organization:
if(
int(object_organization)
in view.get_permission_organizations( view.get_permission_required() )
or request.user.is_superuser
or getattr(request.app_settings.global_organization, 'id', 0) == int(object_organization)
):
return True
elif not self.is_tenancy_model( view ) or request.user.is_superuser:
return True
except Exception as e:
print(traceback.format_exc())
return False

View File

@ -1,320 +0,0 @@
from django.conf import settings
from django.db import models
from django.contrib.auth.models import User, Group, Permission
from django.forms import ValidationError
from .fields import *
from core.middleware.get_request import get_request
from core.mixin.history_save import SaveHistory
class Organization(SaveHistory):
class Meta:
verbose_name_plural = "Organizations"
ordering = ['name']
def __str__(self):
return self.name
def save(self, *args, **kwargs):
if self.slug == '_':
self.slug = self.name.lower().replace(' ', '_')
super().save(*args, **kwargs)
id = models.AutoField(
primary_key=True,
unique=True,
blank=False
)
name = models.CharField(
blank = False,
max_length = 50,
unique = True,
)
manager = models.ForeignKey(
User,
on_delete=models.SET_NULL,
blank = False,
null = True,
help_text = 'Organization Manager'
)
model_notes = models.TextField(
blank = True,
default = None,
null= True,
verbose_name = 'Notes',
)
slug = AutoSlugField()
created = AutoCreatedField()
modified = AutoLastModifiedField()
def get_organization(self):
return self
class TenancyManager(models.Manager):
"""Multi-Tennant Object Manager
This manager specifically caters for the multi-tenancy features of Centurion ERP.
"""
def get_queryset(self):
""" Fetch the data
This function filters the data fetched from the database to that which is from the organizations
the user is a part of.
!!! danger "Requirement"
This method may be overridden however must still be called from the overriding function. i.e. `super().get_queryset()`
## Workflow
This functions workflow is as follows:
- Fetch the user from the request
- Check if the user is authenticated
- Iterate over the users teams
- Store unique organizations from users teams
- return results
Returns:
(queryset): **super user**: return unfiltered data.
(queryset): **not super user**: return data from the stored unique organizations.
"""
request = get_request()
user_organizations: list(str()) = []
if request:
user = request.user._wrapped if hasattr(request.user,'_wrapped') else request.user
if user.is_authenticated:
for team_user in TeamUsers.objects.filter(user=user):
if team_user.team.organization.name not in user_organizations:
if not user_organizations:
self.user_organizations = []
user_organizations += [ team_user.team.organization.id ]
if len(user_organizations) > 0 and not user.is_superuser:
return super().get_queryset().filter(
models.Q(organization__in=user_organizations)
|
models.Q(is_global = True)
)
return super().get_queryset()
class TenancyObject(SaveHistory):
""" Tenancy Model Abstrct class.
This class is for inclusion wihtin **every** model within Centurion ERP.
Provides the required fields, functions and methods for multi tennant objects.
Unless otherwise stated, **no** object within this class may be overridden.
Raises:
ValidationError: User failed to supply organization
"""
objects = TenancyManager()
""" Multi-Tenanant Objects """
class Meta:
abstract = True
def validatate_organization_exists(self):
"""Ensure that the user did provide an organization
Raises:
ValidationError: User failed to supply organization.
"""
if not self:
raise ValidationError('You must provide an organization')
organization = models.ForeignKey(
Organization,
on_delete=models.CASCADE,
blank = False,
null = True,
validators = [validatate_organization_exists],
)
is_global = models.BooleanField(
default = False,
blank = False
)
model_notes = models.TextField(
blank = True,
default = None,
null= True,
verbose_name = 'Notes',
)
def get_organization(self) -> Organization:
return self.organization
class Team(Group, TenancyObject):
class Meta:
# proxy = True
verbose_name_plural = "Teams"
ordering = ['team_name']
def __str__(self):
return self.name
def save(self, force_insert=False, force_update=False, using=None, update_fields=None):
self.name = self.organization.name.lower().replace(' ', '_') + '_' + self.team_name.lower().replace(' ', '_')
super().save(force_insert=force_insert, force_update=force_update, using=using, update_fields=update_fields)
team_name = models.CharField(
verbose_name = 'Name',
blank = False,
max_length = 50,
unique = False,
default = ''
)
created = AutoCreatedField()
modified = AutoLastModifiedField()
@property
def parent_object(self):
""" Fetch the parent object """
return self.organization
def permission_list(self) -> list:
permission_list = []
for permission in self.permissions.all():
if str(permission.content_type.app_label + '.' + permission.codename) in permission_list:
continue
permission_list += [ str(permission.content_type.app_label + '.' + permission.codename) ]
return [permission_list, self.permissions.all()]
class TeamUsers(SaveHistory):
class Meta:
# proxy = True
verbose_name_plural = "Team Users"
ordering = ['user']
id = models.AutoField(
primary_key=True,
unique=True,
blank=False
)
team = models.ForeignKey(
Team,
related_name="team",
on_delete=models.CASCADE)
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE
)
manager = models.BooleanField(
verbose_name='manager',
default=False,
blank=True
)
created = AutoCreatedField()
modified = AutoLastModifiedField()
def delete(self, using=None, keep_parents=False):
""" Delete Team
Overrides, post-action
As teams are an extension of Groups, remove the user to the team.
"""
super().delete(using=using, keep_parents=keep_parents)
group = Group.objects.get(pk=self.team.id)
user = User.objects.get(pk=self.user_id)
user.groups.remove(group)
def get_organization(self) -> Organization:
return self.team.organization
def save(self, *args, **kwargs):
""" Save Team
Overrides, post-action
As teams are an extension of groups, add the user to the matching group.
"""
super().save(*args, **kwargs)
group = Group.objects.get(pk=self.team.id)
user = User.objects.get(pk=self.user_id)
user.groups.add(group)
@property
def parent_object(self):
""" Fetch the parent object """
return self.team

View File

@ -0,0 +1,4 @@
from . import contact # pylint: disable=W0611:unused-import
from . import company_base # pylint: disable=W0611:unused-import
from . import person # pylint: disable=W0611:unused-import
from . import role # pylint: disable=W0611:unused-import

View File

@ -0,0 +1,102 @@
from django.db import models
from access.models.entity import Entity
class Company(
Entity
):
# This model is intended to be called `Organization`, however at the time of
# creation this was not possible as Tenant (ne Organization) still has
# references in code to `organization` witch clashes with the intended name of
# this model.
class Meta:
ordering = [
'name',
]
sub_model_type = 'company'
verbose_name = 'Company'
verbose_name_plural = 'Companies'
name = models.CharField(
blank = False,
help_text = 'The name of this entity',
max_length = 80,
unique = False,
verbose_name = 'Name'
)
def __str__(self) -> str:
return self.name
documentation = ''
history_model_name = 'company'
page_layout: dict = [
{
"name": "Details",
"slug": "details",
"sections": [
{
"layout": "double",
"left": [
'organization',
'name',
],
"right": [
'model_notes',
'created',
'modified',
]
}
]
},
{
"name": "Knowledge Base",
"slug": "kb_articles",
"sections": [
{
"layout": "table",
"field": "knowledge_base",
}
]
},
{
"name": "Tickets",
"slug": "tickets",
"sections": [
{
"layout": "table",
"field": "tickets",
}
]
},
{
"name": "Notes",
"slug": "notes",
"sections": []
},
]
table_fields: list = [
'name',
'organization',
'created',
]
def clean(self):
super().clean()

View File

@ -0,0 +1,119 @@
from django.db import models
from access.models.person import Person
class Contact(
Person
):
class Meta:
ordering = [
'email',
]
sub_model_type = 'contact'
verbose_name = 'Contact'
verbose_name_plural = 'Contacts'
directory = models.BooleanField(
blank = True,
default = True,
help_text = 'Show contact details in directory',
null = False,
verbose_name = 'Show in Directory',
)
email = models.EmailField(
blank = False,
help_text = 'E-mail address for this person',
unique = True,
verbose_name = 'E-Mail',
)
def __str__(self) -> str:
return self.f_name + ' ' + self.l_name
documentation = ''
history_model_name = 'contact'
page_layout: list = [
{
"name": "Details",
"slug": "details",
"sections": [
{
"layout": "double",
"left": [
'organization',
'created',
'modified',
],
"right": [
'model_notes',
'directory',
]
},
{
"name": "Personal Details",
"layout": "double",
"left": [
'display_name',
'dob',
],
"right": [
'f_name',
'm_name',
'l_name',
]
},
{
"name": "",
"layout": "double",
"left": [
'email',
],
"right": [
'',
]
}
]
},
{
"name": "Knowledge Base",
"slug": "kb_articles",
"sections": [
{
"layout": "table",
"field": "knowledge_base",
}
]
},
{
"name": "Notes",
"slug": "notes",
"sections": []
},
]
table_fields: list = [
{
"field": "display_name",
"type": "link",
"key": "_self"
},
'f_name',
'l_name',
'email',
'organization',
'created',
]

246
app/access/models/entity.py Normal file
View File

@ -0,0 +1,246 @@
from django.db import models
from rest_framework.reverse import reverse
from access.fields import AutoCreatedField, AutoLastModifiedField
from access.models.tenancy import TenancyObject
class Entity(
TenancyObject
):
class Meta:
ordering = [
'created',
'modified',
'organization',
]
sub_model_type = 'entity'
verbose_name = 'Entity'
verbose_name_plural = 'Entities'
id = models.AutoField(
blank=False,
help_text = 'Primary key of the entry',
primary_key=True,
unique=True,
verbose_name = 'ID'
)
entity_type = models.CharField(
blank = False,
help_text = 'Type this entity is',
max_length = 30,
unique = False,
verbose_name = 'Entity Type'
)
created = AutoCreatedField()
modified = AutoLastModifiedField()
def __str__(self) -> str:
related_model = self.get_related_model()
if related_model is None:
return f'{self.entity_type} {self.pk}'
return str( related_model )
# app_namespace = 'access'
history_app_label = 'access'
history_model_name = 'entity'
kb_model_name = 'entity'
note_basename = '_api_v2_entity_note'
documentation = ''
page_layout: dict = []
table_fields: list = [
'organization',
'entity_type',
'display_name',
'created',
'modified',
]
def get_related_field_name(self) -> str:
meta = getattr(self, '_meta')
for related_object in getattr(meta, 'related_objects', []):
if not issubclass(related_object.related_model, Entity):
continue
if getattr(self, related_object.name, None):
if(
not str(related_object.name).endswith('history')
and not str(related_object.name).endswith('notes')
):
return related_object.name
return ''
def get_related_model(self):
"""Recursive model Fetch
Returns the lowest model found in a chain of inherited models.
Args:
model (models.Model, optional): Model to fetch the child model from. Defaults to None.
Returns:
models.Model: Lowset model found in inherited model chain
"""
related_model_name = self.get_related_field_name()
related_model = getattr(self, related_model_name, None)
if related_model_name == '':
related_model = None
elif related_model is None:
related_model = self
elif hasattr(related_model, 'get_related_field_name'):
if related_model.get_related_field_name() != '':
related_model = related_model.get_related_model()
return related_model
def get_url_kwargs(self) -> dict:
model = self.get_related_model()
if len(self._meta.parents) == 0 and model is None:
return {
'pk': self.id
}
if model is None:
model = self
kwargs = {
'entity_model': str(model._meta.verbose_name).lower().replace(' ', '_'),
}
if model.pk:
kwargs.update({
'pk': model.id
})
return kwargs
def get_url( self, request = None ) -> str:
"""Fetch the models URL
If URL kwargs are required to generate the URL, define a `get_url_kwargs` that returns them.
Args:
request (object, optional): The request object that was made by the end user. Defaults to None.
Returns:
str: Canonical URL of the model if the `request` object was provided. Otherwise the relative URL.
"""
model = None
if getattr(self, 'get_related_model', None):
model = self.get_related_model()
if model is None:
model = self
sub_entity = ''
if model._meta.model_name != 'entity':
sub_entity = '_sub'
kwargs = self.get_url_kwargs()
view = 'list'
if 'pk' in kwargs:
view = 'detail'
if request:
return reverse(f"v2:" + model.get_app_namespace() + f"_api_v2_entity" + sub_entity + "-" + view, request=request, kwargs = kwargs )
return reverse(f"v2:" + model.get_app_namespace() + f"_api_v2_entity" + sub_entity + "-" + view, kwargs = kwargs )
def save(self, force_insert=False, force_update=False, using=None, update_fields=None):
related_model = self.get_related_model()
if related_model is None:
related_model = self
if self.entity_type != str(related_model._meta.verbose_name).lower().replace(' ', '_'):
self.entity_type = str(related_model._meta.verbose_name).lower().replace(' ', '_')
super().save(force_insert=force_insert, force_update=force_update, using=using, update_fields=update_fields)
def save_history(self, before: dict, after: dict) -> bool:
from access.models.entity_history import EntityAuditHistory
history = super().save_history(
before = before,
after = after,
history_model = EntityAuditHistory
)
return history

View File

@ -0,0 +1,53 @@
from django.db import models
from access.models.entity import Entity
from core.models.model_history import ModelHistory
class EntityAuditHistory(
ModelHistory
):
class Meta:
db_table = 'access_entity_history'
ordering = ModelHistory._meta.ordering
verbose_name = 'Entity History'
verbose_name_plural = 'Entity History'
model = models.ForeignKey(
Entity,
blank = False,
help_text = 'Model this note belongs to',
null = False,
on_delete = models.CASCADE,
related_name = 'history',
verbose_name = 'Model',
)
table_fields: list = []
page_layout: dict = []
def get_object(self):
return self
def get_serialized_model(self, serializer_context):
model = None
from access.serializers.entity import BaseSerializer
model = BaseSerializer(self.model, context = serializer_context)
return model

View File

@ -0,0 +1,45 @@
from django.db import models
from access.models.entity import Entity
from core.models.model_notes import ModelNotes
class EntityNotes(
ModelNotes
):
class Meta:
db_table = 'access_entity_notes'
ordering = ModelNotes._meta.ordering
verbose_name = 'Entity Note'
verbose_name_plural = 'Entity Notes'
model = models.ForeignKey(
Entity,
blank = False,
help_text = 'Model this note belongs to',
null = False,
on_delete = models.CASCADE,
related_name = 'notes',
verbose_name = 'Model',
)
table_fields: list = []
page_layout: dict = []
def get_url_kwargs(self) -> dict:
return {
'model_id': self.model.pk,
'pk': self.pk
}

View File

@ -0,0 +1 @@
from .tenant import Tenant as Organization # pylint: disable=W0611:unused-import

View File

@ -0,0 +1,53 @@
from django.db import models
from core.models.model_history import ModelHistory
from access.models.tenant import Tenant
class OrganizationAuditHistory(
ModelHistory
):
class Meta:
db_table = 'access_organization_history'
ordering = ModelHistory._meta.ordering
verbose_name = 'Organization History'
verbose_name_plural = 'Organization History'
model = models.ForeignKey(
Tenant,
blank = False,
help_text = 'Model this note belongs to',
null = False,
on_delete = models.CASCADE,
related_name = 'history',
verbose_name = 'Model',
)
table_fields: list = []
page_layout: dict = []
def get_object(self):
return self
def get_serialized_model(self, serializer_context):
model = None
from access.serializers.organization import TenantBaseSerializer
model = TenantBaseSerializer(self.model, context = serializer_context)
return model

View File

@ -0,0 +1,45 @@
from django.db import models
from access.models.tenant import Tenant
from core.models.model_notes import ModelNotes
class OrganizationNotes(
ModelNotes
):
class Meta:
db_table = 'access_organization_notes'
ordering = ModelNotes._meta.ordering
verbose_name = 'Organization Note'
verbose_name_plural = 'Organization Notes'
model = models.ForeignKey(
Tenant,
blank = False,
help_text = 'Model this note belongs to',
null = False,
on_delete = models.CASCADE,
related_name = 'notes',
verbose_name = 'Model',
)
table_fields: list = []
page_layout: dict = []
def get_url_kwargs(self) -> dict:
return {
'model_id': self.model.pk,
'pk': self.pk
}

119
app/access/models/person.py Normal file
View File

@ -0,0 +1,119 @@
from django.db import models
from core.exceptions import ValidationError
from access.models.entity import Entity
class Person(
Entity
):
class Meta:
ordering = [
'l_name',
'm_name',
'f_name',
'dob',
]
sub_model_type = 'person'
verbose_name = 'Person'
verbose_name_plural = 'People'
f_name = models.CharField(
blank = False,
help_text = 'The persons first name',
max_length = 64,
unique = False,
verbose_name = 'First Name'
)
m_name = models.CharField(
blank = True,
help_text = 'The persons middle name(s)',
max_length = 100,
null = True,
unique = False,
verbose_name = 'Middle Name(s)'
)
l_name = models.CharField(
blank = False,
help_text = 'The persons Last name',
max_length = 64,
unique = False,
verbose_name = 'Last Name'
)
dob = models.DateField(
blank = True,
help_text = 'The Persons Date of Birth (DOB)',
null = True,
unique = False,
verbose_name = 'DOB',
)
def __str__(self) -> str:
return self.f_name + ' ' + self.l_name + f' (DOB: {self.dob})'
documentation = ''
history_model_name = 'person'
page_layout: dict = []
table_fields: list = [
'organization',
'f_name',
'l_name',
'dob',
'created',
]
def clean(self):
super().clean()
if self.dob is not None:
if self.pk:
duplicate_entry = Person.objects.filter(
f_name = self.f_name,
l_name = self.l_name,
).exclude(
pk = self.pk
)
else:
duplicate_entry = Person.objects.filter(
f_name = self.f_name,
l_name = self.l_name,
)
for entry in duplicate_entry:
if(
entry.f_name == self.f_name
and entry.m_name == self.m_name
and entry.l_name == self.l_name
and entry.dob == self.dob
):
raise ValidationError(
detail = {
'dob': f'Person {self.f_name} {self.l_name} already exists with this birthday {entry.dob}'
},
code = 'duplicate_person_on_dob'
)

174
app/access/models/role.py Normal file
View File

@ -0,0 +1,174 @@
from django.contrib.auth.models import Permission
from django.db import models
from access.fields import AutoCreatedField, AutoLastModifiedField
from access.models.tenancy import TenancyObject
class Role(
TenancyObject
):
class Meta:
ordering = [
'organization',
'name',
]
unique_together = [
'organization',
'name'
]
verbose_name = 'Role'
verbose_name_plural = 'Roles'
id = models.AutoField(
blank=False,
help_text = 'Primary key of the entry',
primary_key=True,
unique=True,
verbose_name = 'ID'
)
name = models.CharField(
blank = False,
help_text = 'Name of this role',
max_length = 30,
unique = False,
verbose_name = 'Name'
)
permissions = models.ManyToManyField(
Permission,
blank = True,
help_text = 'Permissions part of this role',
related_name = 'roles',
symmetrical = False,
verbose_name = 'Permissions'
)
created = AutoCreatedField()
modified = AutoLastModifiedField()
is_global = None
def __str__(self) -> str:
return str( self.organization ) + ' / ' + self.name
documentation = ''
page_layout: dict = [
{
"name": "Details",
"slug": "details",
"sections": [
{
"layout": "double",
"left": [
'organization',
'name',
'created',
'modified',
],
"right": [
'model_notes',
]
},
{
"layout": "single",
"name": "Permissions",
"fields": [
"permissions",
]
},
]
},
{
"name": "Knowledge Base",
"slug": "kb_articles",
"sections": [
{
"layout": "table",
"field": "knowledge_base",
}
]
},
{
"name": "Tickets",
"slug": "tickets",
"sections": [
{
"layout": "table",
"field": "tickets",
}
],
},
{
"name": "Notes",
"slug": "notes",
"sections": []
},
]
table_fields: list = [
'organization',
'name',
'created',
'modified',
]
_permissions: list[ Permission ] = None
_permissions_int: list[ int ] = None
def get_permissions(self, as_int_list = False ):
if self._permissions is None:
permissions = []
permissions_int = []
for permission in self.permissions:
if permission in _permissions:
continue
permissions += [ permission ]
permissions_int += [ permission.id ]
self._permissions = permissions
self._permissions_int = permissions_int
if as_int_list:
return self._permissions_int
return self._permissions_int
def save_history(self, before: dict, after: dict) -> bool:
from access.models.role_history import RoleAuditHistory
history = super().save_history(
before = before,
after = after,
history_model = RoleAuditHistory
)
return history

View File

@ -0,0 +1,53 @@
from django.db import models
from core.models.model_history import ModelHistory
from access.models.role import Role
class RoleAuditHistory(
ModelHistory
):
class Meta:
db_table = 'access_role_history'
ordering = ModelHistory._meta.ordering
verbose_name = 'Role History'
verbose_name_plural = 'Role History'
model = models.ForeignKey(
Role,
blank = False,
help_text = 'Model this note belongs to',
null = False,
on_delete = models.CASCADE,
related_name = 'history',
verbose_name = 'Model',
)
table_fields: list = []
page_layout: dict = []
def get_object(self):
return self
def get_serialized_model(self, serializer_context):
model = None
from access.serializers.role import BaseSerializer
model = BaseSerializer(self.model, context = serializer_context)
return model

View File

@ -0,0 +1,45 @@
from django.db import models
from access.models.role import Role
from core.models.model_notes import ModelNotes
class RoleNotes(
ModelNotes
):
class Meta:
db_table = 'access_role_notes'
ordering = ModelNotes._meta.ordering
verbose_name = 'Role Note'
verbose_name_plural = 'Role Notes'
model = models.ForeignKey(
Role,
blank = False,
help_text = 'Model this note belongs to',
null = False,
on_delete = models.CASCADE,
related_name = 'notes',
verbose_name = 'Model',
)
table_fields: list = []
page_layout: dict = []
def get_url_kwargs(self) -> dict:
return {
'model_id': self.model.pk,
'pk': self.pk
}

191
app/access/models/team.py Normal file
View File

@ -0,0 +1,191 @@
from django.db import models
from django.contrib.auth.models import Group
from rest_framework.reverse import reverse
from access.fields import (
AutoCreatedField,
AutoLastModifiedField
)
from access.models.tenant import Tenant
from access.models.tenancy import TenancyObject
from core import exceptions as centurion_exceptions
class Team(Group, TenancyObject):
class Meta:
ordering = [ 'team_name' ]
verbose_name = 'Team'
verbose_name_plural = "Teams"
def save(self, force_insert=False, force_update=False, using=None, update_fields=None):
if self.organization_id:
self.name = self.organization.name.lower().replace(' ', '_') + '_' + self.team_name.lower().replace(' ', '_')
super().save(force_insert=force_insert, force_update=force_update, using=using, update_fields=update_fields)
def validatate_organization_exists(self):
"""Ensure that the user did provide an organization
Raises:
ValidationError: User failed to supply organization.
"""
if not self:
raise centurion_exceptions.ValidationError('You must provide an organization')
team_name = models.CharField(
blank = False,
help_text = 'Name to give this team',
max_length = 50,
unique = False,
verbose_name = 'Name',
)
organization = models.ForeignKey(
Tenant,
blank = False,
help_text = 'Tenant this belongs to',
null = False,
on_delete = models.CASCADE,
validators = [validatate_organization_exists],
verbose_name = 'Tenant'
)
created = AutoCreatedField()
modified = AutoLastModifiedField()
page_layout: dict = [
{
"name": "Details",
"slug": "details",
"sections": [
{
"layout": "double",
"left": [
'organization',
'team_name',
'created',
'modified',
],
"right": [
'model_notes',
]
},
{
"layout": "table",
"name": "Users",
"field": "users",
},
]
},
{
"name": "Knowledge Base",
"slug": "kb_articles",
"sections": [
{
"layout": "table",
"field": "knowledge_base",
}
]
},
{
"name": "Notes",
"slug": "notes",
"sections": []
},
]
table_fields: list = [
'team_name',
'modified',
'created',
]
def get_url( self, request = None ) -> str:
if request:
return reverse(f"v2:_api_v2_organization_team-detail", request=request, kwargs = self.get_url_kwargs() )
return reverse(f"v2:_api_v2_organization_team-detail", kwargs = self.get_url_kwargs() )
def get_url_kwargs(self) -> dict:
"""Fetch the URL kwargs
Returns:
dict: kwargs required for generating the URL with `reverse`
"""
return {
'organization_id': self.organization.id,
'pk': self.id
}
def get_url_kwargs_notes(self) -> dict:
"""Fetch the URL kwargs for model notes
Returns:
dict: notes kwargs required for generating the URL with `reverse`
"""
return {
'organization_id': self.organization.id,
'model_id': self.id
}
# @property
# def parent_object(self):
# """ Fetch the parent object """
# return self.organization
def permission_list(self) -> list:
permission_list = []
for permission in self.permissions.all():
if str(permission.content_type.app_label + '.' + permission.codename) in permission_list:
continue
permission_list += [ str(permission.content_type.app_label + '.' + permission.codename) ]
return [permission_list, self.permissions.all()]
def __str__(self):
return self.organization.name + ', ' + self.team_name
def save_history(self, before: dict, after: dict) -> bool:
from access.models.team_history import TeamAuditHistory
history = super().save_history(
before = before,
after = after,
history_model = TeamAuditHistory
)
return history

View File

@ -0,0 +1,53 @@
from django.db import models
from core.models.model_history import ModelHistory
from access.models.team import Team
class TeamAuditHistory(
ModelHistory
):
class Meta:
db_table = 'access_team_history'
ordering = ModelHistory._meta.ordering
verbose_name = 'Team History'
verbose_name_plural = 'Team History'
model = models.ForeignKey(
Team,
blank = False,
help_text = 'Model this note belongs to',
null = False,
on_delete = models.CASCADE,
related_name = 'history',
verbose_name = 'Model',
)
table_fields: list = []
page_layout: dict = []
def get_object(self):
return self
def get_serialized_model(self, serializer_context):
model = None
from access.serializers.teams import TeamBaseSerializer
model = TeamBaseSerializer(self.model, context = serializer_context)
return model

View File

@ -0,0 +1,54 @@
from django.db import models
from rest_framework.reverse import reverse
from access.models.team import Team
from core.models.model_notes import ModelNotes
class TeamNotes(
ModelNotes
):
class Meta:
db_table = 'access_team_notes'
ordering = ModelNotes._meta.ordering
verbose_name = 'Team Note'
verbose_name_plural = 'Team Notes'
model = models.ForeignKey(
Team,
blank = False,
help_text = 'Model this note belongs to',
null = False,
on_delete = models.CASCADE,
related_name = 'notes',
verbose_name = 'Model',
)
table_fields: list = []
page_layout: dict = []
def get_url( self, request = None ) -> str:
kwargs = {
'organization_id': self.organization.pk,
'model_id': self.model.pk,
'pk': self.pk
}
if request:
return reverse("v2:_api_v2_team_note-detail", request=request, kwargs = kwargs )
return reverse("v2:_api_v2_team_note-detail", kwargs = kwargs )

View File

@ -0,0 +1,152 @@
import django
from django.conf import settings
from django.db import models
from django.contrib.auth.models import Group
from rest_framework.reverse import reverse
from access.fields import (
AutoCreatedField,
AutoLastModifiedField
)
from access.models.tenant import Tenant
from access.models.team import Team
from core.lib.feature_not_used import FeatureNotUsed
from core.mixin.history_save import SaveHistory
User = django.contrib.auth.get_user_model()
class TeamUsers(SaveHistory):
class Meta:
ordering = ['user']
verbose_name = "Team User"
verbose_name_plural = "Team Users"
id = models.AutoField(
blank=False,
help_text = 'ID of this Team User',
primary_key=True,
unique=True,
verbose_name = 'ID'
)
team = models.ForeignKey(
Team,
blank = False,
help_text = 'Team user belongs to',
null = False,
on_delete=models.CASCADE,
related_name="team",
verbose_name = 'Team'
)
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
blank = False,
help_text = 'User who will be added to the team',
null = False,
on_delete=models.CASCADE,
verbose_name = 'User'
)
manager = models.BooleanField(
blank=True,
default=False,
help_text = 'Is this user to be a manager of this team',
verbose_name='manager',
)
created = AutoCreatedField()
modified = AutoLastModifiedField()
page_layout: list = []
table_fields: list = [
'user',
'manager'
]
history_app_label: str = None
history_model_name: str = None
kb_model_name: str = None
note_basename: str = None
def delete(self, using=None, keep_parents=False):
""" Delete Team
Overrides, post-action
As teams are an extension of Groups, remove the user to the team.
"""
super().delete(using=using, keep_parents=keep_parents)
group = Group.objects.get(pk=self.team.id)
user = User.objects.get(pk=self.user_id)
user.groups.remove(group)
def get_organization(self) -> Tenant:
return self.team.organization
def get_url( self, request = None ) -> str:
url_kwargs: dict = {
'organization_id': self.team.organization.id,
'team_id': self.team.id,
'pk': self.id
}
print(f'url kwargs are: {url_kwargs}')
if request:
return reverse(f"v2:_api_v2_organization_team_user-detail", request=request, kwargs = url_kwargs )
return reverse(f"v2:_api_v2_organization_team_user-detail", kwargs = url_kwargs )
def get_url_kwargs_notes(self):
return FeatureNotUsed
def save(self, *args, **kwargs):
""" Save Team
Overrides, post-action
As teams are an extension of groups, add the user to the matching group.
"""
super().save(*args, **kwargs)
group = Group.objects.get(pk=self.team.id)
user = User.objects.get(pk=self.user_id)
user.groups.add(group)
@property
def parent_object(self):
""" Fetch the parent object """
return self.team
def __str__(self):
return self.user.username

View File

@ -0,0 +1,324 @@
import logging
from django.db import models
from rest_framework.reverse import reverse
from access.models.tenant import Tenant
from core import exceptions as centurion_exceptions
from core.middleware.get_request import get_request
from core.mixin.history_save import SaveHistory
class TenancyManager(models.Manager):
"""Multi-Tennant Object Manager
This manager specifically caters for the multi-tenancy features of Centurion ERP.
"""
def get_queryset(self):
""" Fetch the data
This function filters the data fetched from the database to that which is from the organizations
the user is a part of.
!!! danger "Requirement"
This method may be overridden however must still be called from the overriding function. i.e. `super().get_queryset()`
## Workflow
This functions workflow is as follows:
- Fetch the user from the request
- Check if the user is authenticated
- Iterate over the users teams
- Store unique organizations from users teams
- return results
Returns:
(queryset): **super user**: return unfiltered data.
(queryset): **not super user**: return data from the stored unique organizations.
"""
request = get_request()
user_organizations: list(str()) = []
has_tenant_field = False
if hasattr(self.model, 'organization'):
has_tenant_field = True
if request:
if request.app_settings.global_organization:
user_organizations += [ request.app_settings.global_organization.id ]
user = request.user
if user.is_authenticated:
for team in request.tenancy._user_teams:
if team.organization.id not in user_organizations:
# if not user_organizations:
# self.user_organizations = []
user_organizations += [ team.organization.id ]
if len(user_organizations) > 0 and not user.is_superuser:
if getattr(self.model, 'is_global', False) is True:
if has_tenant_field:
return super().get_queryset().select_related('organization').filter(
models.Q(organization__in=user_organizations)
|
models.Q(is_global = True)
)
else:
return super().get_queryset().filter(
models.Q(organization__in=user_organizations)
|
models.Q(is_global = True)
)
else:
if has_tenant_field:
return super().get_queryset().select_related('organization').filter(
models.Q(organization__in=user_organizations)
)
else:
return super().get_queryset().filter(
models.Q(organization__in=user_organizations)
)
if has_tenant_field:
return super().get_queryset().select_related('organization')
else:
return super().get_queryset().select_related('organization')
class TenancyObject(SaveHistory):
""" Tenancy Model Abstrct class.
This class is for inclusion wihtin **every** model within Centurion ERP.
Provides the required fields, functions and methods for multi tennant objects.
Unless otherwise stated, **no** object within this class may be overridden.
Raises:
ValidationError: User failed to supply organization
"""
objects = TenancyManager()
""" Multi-Tenanant Objects """
class Meta:
abstract = True
def validatate_organization_exists(self):
"""Ensure that the user did provide an organization
Raises:
ValidationError: User failed to supply organization.
"""
if not self:
raise centurion_exceptions.ValidationError('You must provide an organization')
id = models.AutoField(
blank=False,
help_text = 'ID of the item',
primary_key=True,
unique=True,
verbose_name = 'ID'
)
organization = models.ForeignKey(
Tenant,
blank = False,
help_text = 'Tenancy this belongs to',
null = False,
on_delete = models.CASCADE,
related_name = '+',
validators = [validatate_organization_exists],
verbose_name = 'Tenant'
)
is_global = models.BooleanField(
blank = False,
default = False,
help_text = 'Is this a global object?',
verbose_name = 'Global Object'
)
model_notes = models.TextField(
blank = True,
default = None,
help_text = 'Tid bits of information',
null = True,
verbose_name = 'Notes',
)
def get_organization(self) -> Tenant:
return self.organization
app_namespace: str = None
"""Application namespace.
Specify the applications namespace i.e. `devops`, without including
the API version, i.e. `v2:devops`.
"""
history_app_label: str = None
"""History Model Application Label
This value is derived from `<model>._meta.app_label`. This value should
only be used when there is model inheritence.
"""
history_model_name: str = None
"""History Model Model Name
This value is derived from `<model>._meta.model_name`. This value should
only be used when there is model inheritence.
"""
kb_model_name: str = None
"""Model name to use for KB article linking
This value is derived from `<model>._meta.model_name`. This value should
only be used when there is model inheritence.
"""
_log: logging.Logger = None
def get_log(self):
if self._log is None:
self._log = logging.getLogger('centurion.' + self._meta.app_label)
return self._log
page_layout: list = None
note_basename: str = None
"""URL BaseName for the notes endpoint.
Don't specify the `app_namespace`, use property `app_namespace` above.
"""
def get_page_layout(self):
""" FEtch the page layout"""
return self.page_layout
def get_app_namespace(self) -> str:
"""Fetch the Application namespace if specified.
Returns:
str: Application namespace suffixed with colin `:`
None: No application namespace found.
"""
app_namespace = ''
if self.app_namespace:
app_namespace = self.app_namespace + ':'
return str(app_namespace)
def get_url( self, request = None ) -> str:
"""Fetch the models URL
If URL kwargs are required to generate the URL, define a `get_url_kwargs` that returns them.
Args:
request (object, optional): The request object that was made by the end user. Defaults to None.
Returns:
str: Canonical URL of the model if the `request` object was provided. Otherwise the relative URL.
"""
model_name = str(self._meta.verbose_name.lower()).replace(' ', '_')
if request:
return reverse(f"v2:" + self.get_app_namespace() + f"_api_v2_{model_name}-detail", request=request, kwargs = self.get_url_kwargs() )
return reverse(f"v2:" + self.get_app_namespace() + f"_api_v2_{model_name}-detail", kwargs = self.get_url_kwargs() )
def get_url_kwargs(self) -> dict:
"""Fetch the URL kwargs
Returns:
dict: kwargs required for generating the URL with `reverse`
"""
return {
'pk': self.id
}
def get_url_kwargs_notes(self) -> dict:
"""Fetch the URL kwargs for model notes
Returns:
dict: notes kwargs required for generating the URL with `reverse`
"""
return {
'model_id': self.id
}
def save(self, force_insert=False, force_update=False, using=None, update_fields=None):
self.clean()
if(
not getattr(self, 'organization', None)
and self._meta.model_name !='appsettingsaudithistory' # App Settings for
):
raise centurion_exceptions.ValidationError(
detail = {
'organization': 'Tenant is required'
},
code = 'required'
)
super().save(force_insert=force_insert, force_update=force_update, using=using, update_fields=update_fields)

View File

@ -0,0 +1,247 @@
# import django
import logging
from django.core.exceptions import (
ValidationError,
)
from django.db import models
# from rest_framework.reverse import reverse
from access.models.tenant import Tenant
# from core import exceptions as centurion_exceptions
# from core.mixin.history_save import SaveHistory
class TenancyManager(
models.Manager
):
"""Multi-Tennant Object Manager
This manager specifically caters for the multi-tenancy features of Centurion ERP.
"""
def get_queryset(self):
""" Fetch the data
When the model contains the user data, the query is filtered to their
and the globally defined Tenancy only.
Returns:
(queryset): **super user**: return unfiltered data.
(queryset): **not super user**: return data from the stored unique organizations.
"""
# user = None # When CenturionUser in use
# if hasattr(self.model, 'context'):
# user = self.model.context['user']
# if user:
# tencies = user.get_tenancies(int_list = True)
# if len(tenancies) > 0 and not request.user.is_superuser:
# if hasattr(self.model, 'organization'):
# return super().get_queryset().select_related('organization').filter(
# models.Q(organization__in = tenancies)
# )
# return super().get_queryset().select_related('organization').filter(
# models.Q(organization__in = tenancies)
# )
request = None
if hasattr(self.model, 'context'):
request = self.model.context['request']
if request is not None:
tenancies: list(str()) = []
if request.app_settings.global_organization:
tenancies += [ request.app_settings.global_organization.id ]
if request.user.is_authenticated:
for team in request.tenancy._user_teams:
if team.organization.id in tenancies:
continue
tenancies += [ team.organization.id ]
if len(tenancies) > 0 and not request.user.is_superuser:
if hasattr(self.model, 'organization'):
return super().get_queryset().select_related('organization').filter(
models.Q(organization__in = tenancies)
)
return super().get_queryset().select_related('organization').filter(
models.Q(organization__in = tenancies)
)
return super().get_queryset().select_related('organization')
class TenancyObjectOld:
kb_model_name: str = None
"""Model name to use for KB article linking
This value is derived from `<model>._meta.model_name`. This value should
only be used when there is model inheritence.
"""
_log: logging.Logger = None
def get_log(self):
if self._log is None:
self._log = logging.getLogger('centurion.' + self._meta.app_label)
return self._log
page_layout: list = None
note_basename: str = None
"""URL BaseName for the notes endpoint.
Don't specify the `app_namespace`, use property `app_namespace` above.
"""
def get_page_layout(self):
""" FEtch the page layout"""
return self.page_layout
def get_app_namespace(self) -> str:
"""Fetch the Application namespace if specified.
Returns:
str: Application namespace suffixed with colin `:`
None: No application namespace found.
"""
app_namespace = ''
if self.app_namespace:
app_namespace = self.app_namespace + ':'
return str(app_namespace)
def get_url_kwargs_notes(self) -> dict:
"""Fetch the URL kwargs for model notes
Returns:
dict: notes kwargs required for generating the URL with `reverse`
"""
return {
'model_id': self.id
}
class TenancyAbstractModel(
# TenancyObjectOld,
# models.Model,
):
""" Tenancy Model Abstract class.
This class is for inclusion within **every** model within Centurion ERP.
Provides the required fields, functions and methods for multi tennant objects.
Unless otherwise stated, **no** object within this class may be overridden.
Raises:
ValidationError: User failed to supply organization
"""
objects = TenancyManager()
""" Multi-Tenanant Objects """
class Meta:
abstract = True
def validatate_organization_exists(self):
"""Ensure that the user did provide an organization
Raises:
ValidationError: User failed to supply organization.
"""
if not self:
raise ValidationError(
code = 'required',
message = 'You must provide an organization'
)
id = models.AutoField(
blank=False,
help_text = 'ID of the item',
primary_key=True,
unique=True,
verbose_name = 'ID'
)
organization = models.ForeignKey(
Tenant,
blank = False,
help_text = 'Tenant this belongs to',
null = False,
on_delete = models.CASCADE,
related_name = '+',
validators = [
validatate_organization_exists
],
verbose_name = 'Tenant'
)
is_global = models.BooleanField(
blank = False,
default = False,
help_text = 'Is this a global object?',
null = False,
verbose_name = 'Global Object'
)
model_notes = models.TextField(
blank = True,
default = None, # ToDo: Remove this field
help_text = 'Tid bits of information',
null = True,
verbose_name = 'Notes',
)
def get_tenant(self) -> Tenant:
""" Return the models Tenancy
This model can be safely over-ridden as long as it returns the models
tenancy
"""
return self.organization

161
app/access/models/tenant.py Normal file
View File

@ -0,0 +1,161 @@
import django
from django.conf import settings
from django.db import models
from rest_framework.reverse import reverse
from access.fields import (
AutoCreatedField,
AutoLastModifiedField,
AutoSlugField
)
from core.mixin.history_save import SaveHistory
User = django.contrib.auth.get_user_model()
class Tenant(SaveHistory):
class Meta:
verbose_name = "Tenant"
verbose_name_plural = "Tenants"
ordering = ['name']
def save(self, *args, **kwargs):
if self.slug == '_':
self.slug = self.name.lower().replace(' ', '_')
super().save(*args, **kwargs)
id = models.AutoField(
blank=False,
help_text = 'ID of this item',
primary_key=True,
unique=True,
verbose_name = 'ID'
)
name = models.CharField(
blank = False,
help_text = 'Name of this Tenancy',
max_length = 50,
unique = True,
verbose_name = 'Name'
)
manager = models.ForeignKey(
settings.AUTH_USER_MODEL,
blank = False,
help_text = 'Manager for this Tenancy',
null = True,
on_delete=models.SET_NULL,
verbose_name = 'Manager'
)
model_notes = models.TextField(
blank = True,
default = None,
help_text = 'Tid bits of information',
null= True,
verbose_name = 'Notes',
)
slug = AutoSlugField()
created = AutoCreatedField()
modified = AutoLastModifiedField()
def get_organization(self):
return self
def __int__(self):
return self.id
def __str__(self):
return self.name
table_fields: list = [
'nbsp',
'name',
'created',
'modified',
'nbsp'
]
page_layout: list = [
{
"name": "Details",
"slug": "details",
"sections": [
{
"layout": "double",
"left": [
'name',
'manager',
'created',
'modified',
],
"right": [
'model_notes',
]
}
]
},
{
"name": "Teams",
"slug": "teams",
"sections": [
{
"layout": "table",
"field": "teams"
}
]
},
{
"name": "Knowledge Base",
"slug": "kb_articles",
"sections": [
{
"layout": "table",
"field": "knowledge_base",
}
]
},
{
"name": "Notes",
"slug": "notes",
"sections": []
}
]
def get_url( self, request = None ) -> str:
if request:
return reverse("v2:_api_v2_organization-detail", request=request, kwargs={'pk': self.id})
return reverse("v2:_api_v2_organization-detail", kwargs={'pk': self.id})
def save_history(self, before: dict, after: dict) -> bool:
from access.models.organization_history import OrganizationAuditHistory
history = super().save_history(
before = before,
after = after,
history_model = OrganizationAuditHistory
)
return history
Organization = Tenant

View File

@ -0,0 +1,195 @@
from django.contrib.auth.models import Permission, User
from django.core.exceptions import PermissionDenied
from access.models.tenant import Tenant
class CenturionUser(
User,
):
"""Centurion User
A Multi-Tenant User wirh permission Checking.
ToDo:
- Add to Roles user field `related_name = roles`
- Add to Roles group field `related_name = roles`
# - have group lookup prefetch related roles__permissions
- have user lookup prefetch related roles__permissions and groups__roles__permissions
Args:
User (Model): Django Base User
"""
_tenancies: list[Tenant] = None
_tenancies_int: list[int] = None
_permissions: list[Permission] = None
_permissions_by_tenancy: dict[ str, list[ Permission ] ] = None
"""Permissions by Tenancy
`{ 'tenancy_{id}': [ Permission ] }`
"""
# EMAIL_FIELD = 'email' # Update contact email field name so it's different to the user model.
# REQUIRED_FIELDS = [
# EMAIL_FIELD,
# 'f_name',
# 'l_name',
# ]
class Meta:
abstract = False
proxy = True # User will be linked to Employee/Customer entity via related_name from the entity.
# ToDo: refactory Employee/Customer to inherit from a new model. entity_user
verbose_name = 'Centurion User'
verbose_name_plural = 'Centurion Users'
def get_full_name(self) -> str:
return f'{self.entity_user.f_name} {self.entity_user.l_name}'
def get_group_permissions(self, tenancy: bool = True) -> dict[ str, list[ Permission ] ] | list[ Permission ]:
""" Get the Users Permissions
Args:
tenancy (bool, optional): Return permission in list. Defaults to True.
Returns:
dict[ str, list[ Permission ] ]: Permissions listed by tenancy
list[ Permission ]: All Permissions
"""
for group in self.groups:
for role in group.roles:
pass
# role.get_permissions()
def get_permissions(self, tenancy: bool = True) -> dict[ str, list[ Permission ] ] | list[ Permission ]:
""" Get the Users Permissions
Args:
tenancy (bool, optional): Return permission in list. Defaults to True.
Returns:
dict[ str, list[ Permission ] ]: Permissions listed by tenancy
list[ Permission ]: All Permissions
"""
# also get group permissions. self.get_group_permissions()
for role in self.roles:
pass
# role.get_permissions()
# also populate `self._tenancies` and `self._tenancies_int`
def get_short_name() -> str:
return self.entity_user.f_name
def get_tenancies(self, int_list = False) -> list[ Tenant ] | list[ int ]:
"""Get the Tenancies the user is in.
Args:
int_list (bool, optional): Return Tenancy list as int values. Defaults to False.
Returns:
list[ Tenant ] | list[ int ]: All Tenancies the user is in.
"""
if self._tenancies is None:
if self._permissions is None:
self.get_permissions
tenancies: list = []
tenancies_int: list = []
for role in self.roles:
if role.organization in tenancies:
continue
tenancies += [ role.organization ]
tenancies_int += [ role.organization.id ]
self._tenancies = tenancies
self._tenancies_int = tenancies_int
if as_int_list:
return self._tenancies_int
return self._tenancies
def has_module_perms(self, app_label): # is this needed?
# if has app_label in perms
raise PermissionDenied
def has_perm(self, permission: Permission, obj = None, tenancy: Tenant = None) -> bool:
if(
obj is None
and tenancy is None
):
raise ValueError('Both obj and tenancy cant be None')
if tenancy is None:
tenancy = obj.organization
# if self.has_tenancy_permission(perm, tenancy):
# for tenancy, permissions in self.get_permissions().items()
if tenancy is None:
raise ValueError('tenancy cant be None')
permissions = self.get_permissions()
if f'tenancy_{tenancy.id}' not in permissions:
raise PermissionDenied
for tenancy, permissions in self.get_permissions().items():
if(
tenancy == f'tenancy_{tenancy.id}'
and perm in permissions
):
return True
raise PermissionDenied
def has_perms(self, permission_list: list[ Permission ], obj = None, tenancy: Tenant = None):
for perm in perm_list:
self.has_perm( perm, obj )
return True

View File

@ -0,0 +1,90 @@
from rest_framework import serializers
from drf_spectacular.utils import extend_schema_serializer
from access.models.entity import Entity
from api.serializers import common
from access.serializers.organization import TenantBaseSerializer
@extend_schema_serializer(component_name = 'EntityBaseBaseSerializer')
class BaseSerializer(serializers.ModelSerializer):
display_name = serializers.SerializerMethodField('get_display_name')
def get_display_name(self, item) -> str:
return str( item )
url = serializers.SerializerMethodField('get_url')
def get_url(self, item) -> str:
return item.get_url( request = self.context['view'].request )
class Meta:
model = Entity
fields = [
'id',
'display_name',
'url',
]
read_only_fields = [
'id',
'display_name',
'url',
]
@extend_schema_serializer(component_name = 'EntityBaseModelSerializer')
class ModelSerializer(
common.CommonModelSerializer,
BaseSerializer
):
"""Entity Base Model"""
_urls = serializers.SerializerMethodField('get_url')
class Meta:
model = Entity
fields = [
'id',
'organization',
'entity_type',
'display_name',
'model_notes',
'is_global',
'created',
'modified',
'_urls',
]
read_only_fields = [
'id',
'display_name',
'entity_type',
'created',
'modified',
'_urls',
]
@extend_schema_serializer(component_name = 'EntityBaseViewSerializer')
class ViewSerializer(ModelSerializer):
"""Entity Base View Model"""
organization = TenantBaseSerializer(many=False, read_only=True)

View File

@ -0,0 +1,70 @@
from drf_spectacular.utils import extend_schema_serializer
from access.models.company_base import Company
from access.serializers.entity import (
BaseSerializer as BaseBaseSerializer,
ModelSerializer as BaseModelSerializer,
)
from access.serializers.organization import TenantBaseSerializer
class BaseSerializer(
BaseBaseSerializer,
):
pass
@extend_schema_serializer(component_name = 'CompanyEntityModelSerializer')
class ModelSerializer(
BaseSerializer,
BaseModelSerializer,
):
"""Company Model
This model inherits from the Entity base model.
"""
class Meta:
model = Company
fields = [
'id',
'entity_ptr_id',
'organization',
'entity_type',
'display_name',
'name',
'model_notes',
'is_global',
'created',
'modified',
'_urls',
]
read_only_fields = [
'id',
'display_name',
'entity_type',
'created',
'modified',
'_urls',
]
@extend_schema_serializer(component_name = 'CompanyEntityViewSerializer')
class ViewSerializer(
ModelSerializer,
):
"""Company View Model
This model inherits from the Entity base model.
"""
organization = TenantBaseSerializer(many=False, read_only=True)

View File

@ -0,0 +1,75 @@
from drf_spectacular.utils import extend_schema_serializer
from access.models.contact import Contact
from access.serializers.entity_person import (
BaseSerializer as BaseBaseSerializer,
ModelSerializer as BaseModelSerializer,
)
from access.serializers.organization import TenantBaseSerializer
class BaseSerializer(
BaseBaseSerializer,
):
pass
@extend_schema_serializer(component_name = 'ContactEntityModelSerializer')
class ModelSerializer(
BaseSerializer,
BaseModelSerializer,
):
"""Contact Model
This model first inherits from Person then inherits from the Entity Base model.
"""
class Meta:
model = Contact
fields = [
'id',
'person_ptr_id',
'organization',
'entity_type',
'display_name',
'f_name',
'm_name',
'l_name',
'dob',
'email',
'directory',
'model_notes',
'is_global',
'created',
'modified',
'_urls',
]
read_only_fields = [
'id',
'display_name',
'entity_type',
'created',
'modified',
'_urls',
]
@extend_schema_serializer(component_name = 'ContactEntityViewSerializer')
class ViewSerializer(
ModelSerializer,
):
"""Contact View Model
This model inherits from the Person model.
"""
organization = TenantBaseSerializer(many=False, read_only=True)

View File

@ -0,0 +1,41 @@
from core.serializers.model_notes import (
ModelNoteBaseSerializer,
ModelNoteModelSerializer,
ModelNoteViewSerializer
)
from access.models.entity_notes import EntityNotes
class EntityNoteBaseSerializer(ModelNoteBaseSerializer):
pass
class EntityNoteModelSerializer(
ModelNoteModelSerializer
):
class Meta:
model = EntityNotes
fields = ModelNoteModelSerializer.Meta.fields + [
'model',
]
read_only_fields = ModelNoteModelSerializer.Meta.read_only_fields + [
'model',
'content_type',
]
class EntityNoteViewSerializer(
ModelNoteViewSerializer,
EntityNoteModelSerializer,
):
pass

View File

@ -0,0 +1,73 @@
from drf_spectacular.utils import extend_schema_serializer
from access.models.person import Person
from access.serializers.entity import (
BaseSerializer as BaseBaseSerializer,
ModelSerializer as BaseModelSerializer,
)
from access.serializers.organization import TenantBaseSerializer
class BaseSerializer(
BaseBaseSerializer,
):
pass
@extend_schema_serializer(component_name = 'PersonEntityModelSerializer')
class ModelSerializer(
BaseSerializer,
BaseModelSerializer,
):
"""Person Model
This model inherits from the Entity base model.
"""
class Meta:
model = Person
fields = [
'id',
'entity_ptr_id',
'organization',
'entity_type',
'display_name',
'f_name',
'm_name',
'l_name',
'dob',
'model_notes',
'is_global',
'created',
'modified',
'_urls',
]
read_only_fields = [
'id',
'display_name',
'entity_type',
'created',
'modified',
'_urls',
]
@extend_schema_serializer(component_name = 'PersonEntityViewSerializer')
class ViewSerializer(
ModelSerializer,
):
"""Person View Model
This model inherits from the Entity base model.
"""
organization = TenantBaseSerializer(many=False, read_only=True)

View File

@ -0,0 +1,105 @@
from rest_framework.reverse import reverse
from rest_framework import serializers
from access.models.tenant import Tenant
from centurion.serializers.user import UserBaseSerializer
from core import fields as centurion_field
Organization = Tenant
class TenantBaseSerializer(serializers.ModelSerializer):
display_name = serializers.SerializerMethodField('get_display_name')
def get_display_name(self, item) -> str:
return str( item )
url = serializers.HyperlinkedIdentityField(
view_name="v2:_api_v2_organization-detail", format="html"
)
class Meta:
model = Tenant
fields = [
'id',
'display_name',
'name',
'url',
]
read_only_fields = [
'id',
'display_name',
'name',
'url',
]
class TenantModelSerializer(
TenantBaseSerializer
):
_urls = serializers.SerializerMethodField('get_url')
def get_url(self, item) -> dict:
return {
'_self': item.get_url( request = self._context['view'].request ),
'knowledge_base': reverse(
"v2:_api_v2_model_kb-list",
request=self._context['view'].request,
kwargs={
'model': self.Meta.model._meta.model_name,
'model_pk': item.pk
}
),
'notes': reverse(
"v2:_api_v2_organization_note-list",
request=self._context['view'].request,
kwargs={
'model_id': item.pk
}
),
'teams': reverse("v2:_api_v2_organization_team-list", request=self._context['view'].request, kwargs={'organization_id': item.pk}),
}
model_notes = centurion_field.MarkdownField( required = False )
class Meta:
model = Tenant
fields = '__all__'
fields = [
'id',
'display_name',
'name',
'model_notes',
'manager',
'created',
'modified',
'_urls',
]
read_only_fields = [
'id',
'display_name',
'created',
'modified',
'_urls',
]
class TenantViewSerializer(TenantModelSerializer):
pass
manager = UserBaseSerializer(many=False, read_only = True)

View File

@ -0,0 +1,41 @@
from access.models.organization_notes import OrganizationNotes
from core.serializers.model_notes import (
ModelNoteBaseSerializer,
ModelNoteModelSerializer,
ModelNoteViewSerializer
)
class OrganizationNoteBaseSerializer(ModelNoteBaseSerializer):
pass
class OrganizationNoteModelSerializer(
ModelNoteModelSerializer
):
class Meta:
model = OrganizationNotes
fields = ModelNoteModelSerializer.Meta.fields + [
'model',
]
read_only_fields = ModelNoteModelSerializer.Meta.read_only_fields + [
'model',
'content_type',
]
class OrganizationNoteViewSerializer(
ModelNoteViewSerializer,
OrganizationNoteModelSerializer,
):
pass

View File

@ -0,0 +1,114 @@
from rest_framework import serializers
from rest_framework.reverse import reverse
from drf_spectacular.utils import extend_schema_serializer
from access.functions.permissions import permission_queryset
from access.models.role import Role
from access.serializers.organization import TenantBaseSerializer
from api.serializers import common
from centurion.serializers.permission import PermissionBaseSerializer
@extend_schema_serializer(component_name = 'RoleBaseSerializer')
class BaseSerializer(serializers.ModelSerializer):
display_name = serializers.SerializerMethodField('get_display_name')
def get_display_name(self, item) -> str:
return str( item )
url = serializers.SerializerMethodField('get_url')
def get_url(self, item) -> str:
return item.get_url( request = self.context['view'].request )
class Meta:
model = Role
fields = [
'id',
'display_name',
'url',
]
read_only_fields = [
'id',
'display_name',
'url',
]
@extend_schema_serializer(component_name = 'RoleModelSerializer')
class ModelSerializer(
common.CommonModelSerializer,
BaseSerializer
):
"""Role Base Model"""
_urls = serializers.SerializerMethodField('get_url')
def get_url(self, item) -> dict:
get_url = super().get_url( item = item )
get_url.update({
'tickets': reverse(
"v2:_api_v2_item_tickets-list",
request=self._context['view'].request,
kwargs={
'item_class': self.Meta.model._meta.model_name,
'item_id': item.pk
}
)
})
return get_url
permissions = serializers.PrimaryKeyRelatedField(many = True, queryset=permission_queryset(), required = False)
class Meta:
model = Role
fields = [
'id',
'organization',
'display_name',
'name',
'permissions',
'model_notes',
'created',
'modified',
'_urls',
]
read_only_fields = [
'id',
'display_name',
'created',
'modified',
'_urls',
]
@extend_schema_serializer(component_name = 'RoleViewSerializer')
class ViewSerializer(ModelSerializer):
"""Role Base View Model"""
organization = TenantBaseSerializer( many=False, read_only=True )
permissions = PermissionBaseSerializer( many=True, read_only=True )

View File

@ -0,0 +1,41 @@
from access.models.role_notes import RoleNotes
from core.serializers.model_notes import (
ModelNoteBaseSerializer,
ModelNoteModelSerializer,
ModelNoteViewSerializer
)
class RoleNoteBaseSerializer(ModelNoteBaseSerializer):
pass
class RoleNoteModelSerializer(
ModelNoteModelSerializer
):
class Meta:
model = RoleNotes
fields = ModelNoteModelSerializer.Meta.fields + [
'model',
]
read_only_fields = ModelNoteModelSerializer.Meta.read_only_fields + [
'model',
'content_type',
]
class RoleNoteViewSerializer(
ModelNoteViewSerializer,
RoleNoteModelSerializer,
):
pass

View File

@ -0,0 +1,41 @@
from access.models.team_notes import TeamNotes
from core.serializers.model_notes import (
ModelNoteBaseSerializer,
ModelNoteModelSerializer,
ModelNoteViewSerializer
)
class TeamNoteBaseSerializer(ModelNoteBaseSerializer):
pass
class TeamNoteModelSerializer(
ModelNoteModelSerializer
):
class Meta:
model = TeamNotes
fields = ModelNoteModelSerializer.Meta.fields + [
'model',
]
read_only_fields = ModelNoteModelSerializer.Meta.read_only_fields + [
'model',
'content_type',
]
class TeamNoteViewSerializer(
ModelNoteViewSerializer,
TeamNoteModelSerializer,
):
pass

View File

@ -0,0 +1,101 @@
from rest_framework import serializers
from access.models.team_user import TeamUsers
from api.serializers import common
from centurion.serializers.user import UserBaseSerializer
class TeamUserBaseSerializer(serializers.ModelSerializer):
display_name = serializers.SerializerMethodField('get_display_name')
def get_display_name(self, item) -> str:
return str( item )
url = serializers.SerializerMethodField('get_url')
def get_url(self, item) -> str:
return item.get_url( request = self.context['view'].request )
class Meta:
model = TeamUsers
fields = [
'id',
'display_name',
'url',
]
read_only_fields = [
'id',
'display_name',
'url',
]
class TeamUserModelSerializer(
common.CommonModelSerializer,
TeamUserBaseSerializer
):
_urls = serializers.SerializerMethodField('get_url')
def get_url(self, item) -> dict:
get_url = super().get_url( item = item )
del get_url['history']
del get_url['knowledge_base']
return get_url
class Meta:
model = TeamUsers
fields = [
'id',
'display_name',
'manager',
'user',
'created',
'modified',
'_urls',
]
read_only_fields = [
'id',
'display_name',
'created',
'modified',
'_urls',
]
def is_valid(self, *, raise_exception=True) -> bool:
is_valid = False
is_valid = super().is_valid(raise_exception=raise_exception)
self.validated_data['team_id'] = int(self._context['view'].kwargs['team_id'])
return is_valid
class TeamUserViewSerializer(TeamUserModelSerializer):
user = UserBaseSerializer(read_only = True)

View File

@ -0,0 +1,132 @@
from rest_framework.reverse import reverse
from rest_framework import serializers
from access.models.team import Team
from api.serializers import common
from access.functions.permissions import permission_queryset
from access.serializers.organization import TenantBaseSerializer
from centurion.serializers.permission import PermissionBaseSerializer
from core import fields as centurion_field
class TeamBaseSerializer(serializers.ModelSerializer):
display_name = serializers.SerializerMethodField('get_display_name')
def get_display_name(self, item) -> str:
return str( item )
url = serializers.SerializerMethodField('get_url')
def get_url(self, item) -> str:
return item.get_url( request = self.context['view'].request )
class Meta:
model = Team
fields = [
'id',
'display_name',
'team_name',
'url',
]
read_only_fields = [
'id',
'display_name',
'team_name',
'url',
]
class TeamModelSerializer(
common.CommonModelSerializer,
TeamBaseSerializer
):
_urls = serializers.SerializerMethodField('get_url')
def get_url(self, item) -> dict:
get_url = super().get_url( item = item )
get_url.update({
'users': reverse(
'v2:_api_v2_organization_team_user-list',
request=self.context['view'].request,
kwargs={
'organization_id': item.organization.id,
'team_id': item.pk
}
)
})
return get_url
team_name = centurion_field.CharField( autolink = True )
permissions = serializers.PrimaryKeyRelatedField(many = True, queryset=permission_queryset(), required = False)
class Meta:
model = Team
fields = '__all__'
fields = [
'id',
'display_name',
'team_name',
'model_notes',
'permissions',
'organization',
'is_global',
'created',
'modified',
'_urls',
]
read_only_fields = [
'id',
'display_name',
'name',
'organization',
'created',
'modified',
'_urls',
]
def is_valid(self, *, raise_exception=True) -> bool:
is_valid = False
is_valid = super().is_valid(raise_exception=raise_exception)
self.validated_data['organization_id'] = int(self._context['view'].kwargs['organization_id'])
return is_valid
class TeamViewSerializer(TeamModelSerializer):
organization = TenantBaseSerializer(many=False, read_only=True)
permissions = PermissionBaseSerializer(many = True)

View File

@ -1,7 +1,3 @@
import pytest
import unittest
from access.models import TenancyManager
@ -11,78 +7,26 @@ class TenancyObject:
model = None
""" Model to be tested """
should_model_history_be_saved: bool = True
""" Should model history be saved.
def test_has_attr_get_organization(self):
""" TenancyObject attribute check
TenancyObject has function get_organization
"""
assert hasattr(self.model, 'get_organization')
By default this should always be 'True', however in special
circumstances, this may not be desired.
"""
def test_has_attr_is_global(self):
""" TenancyObject attribute check
# def test_history_save(self):
# """Confirm the desired intent for saving model history."""
TenancyObject has field is_global
"""
assert hasattr(self.model, 'is_global')
# assert self.model.save_model_history == self.should_model_history_be_saved
def test_has_attr_model_notes(self):
""" TenancyObject attribute check
# @pytest.mark.skip(reason="to be written")
# def test_edit_no_organization_fails(self):
# """ Devices must be assigned an organization
TenancyObject has field model_notes
"""
# Must not be able to edit an item without an organization
# """
# pass
assert hasattr(self.model, 'model_notes')
def test_has_attr_organization(self):
""" TenancyObject attribute check
TenancyObject has field organization
"""
assert hasattr(self.model, 'organization')
@pytest.mark.skip(reason="to be written")
def test_create_no_organization_fails(self):
""" Devices must be assigned an organization
Must not be able to create an item without an organization
"""
pass
@pytest.mark.skip(reason="to be written")
def test_edit_no_organization_fails(self):
""" Devices must be assigned an organization
Must not be able to edit an item without an organization
"""
pass
def test_has_attr_organization(self):
""" TenancyObject attribute check
TenancyObject has function objects
"""
assert hasattr(self.model, 'objects')
def test_attribute_is_type_objects(self):
""" Attribute Check
attribute `objects` must be set to `access.models.TenancyManager()`
"""
assert type(self.model.objects) is TenancyManager

View File

@ -0,0 +1,24 @@
import pytest
from access.models.company_base import Company
@pytest.fixture( scope = 'class')
def model(request):
request.cls.model = Company
yield request.cls.model
del request.cls.model
@pytest.fixture(scope='function')
def create_serializer():
from access.serializers.entity_company import ModelSerializer
yield ModelSerializer

View File

@ -0,0 +1,72 @@
from django.test import TestCase
from access.models.company_base import Company
from access.tests.functional.entity.test_functional_entity_metadata import (
EntityMetadataInheritedCases
)
class CompanyMetadataTestCases(
EntityMetadataInheritedCases,
):
add_data: dict = {
'name': 'Ian1'
}
kwargs_create_item: dict = {
'name': 'Ian2',
}
kwargs_create_item_diff_org: dict = {
'name': 'Ian3',
}
model = Company
class CompanyMetadataInheritedCases(
CompanyMetadataTestCases,
):
model = None
kwargs_create_item: dict = {}
kwargs_create_item_diff_org: dict = {}
@classmethod
def setUpTestData(self):
self.kwargs_create_item = {
**super().kwargs_create_item,
**self.kwargs_create_item
}
self.kwargs_create_item_diff_org = {
**super().kwargs_create_item_diff_org,
**self.kwargs_create_item_diff_org
}
# self.url_kwargs = {
# 'entity_model': self.model._meta.sub_model_type
# }
# self.url_view_kwargs = {
# 'entity_model': self.model._meta.sub_model_type
# }
super().setUpTestData()
class CompanyMetadataTest(
CompanyMetadataTestCases,
TestCase,
):
pass

View File

@ -0,0 +1,43 @@
import pytest
from access.tests.functional.entity.test_functional_entity_permission import (
EntityPermissionsAPIInheritedCases
)
class CompanyPermissionsAPITestCases(
EntityPermissionsAPIInheritedCases,
):
add_data: dict = {
'name': 'Ian1',
}
kwargs_create_item: dict = {
'name': 'Ian2',
}
kwargs_create_item_diff_org: dict = {
'name': 'Ian3',
}
class CompanyPermissionsAPIInheritedCases(
CompanyPermissionsAPITestCases,
):
add_data: dict = None
kwargs_create_item: dict = None
kwargs_create_item_diff_org: dict = None
class CompanyPermissionsAPIPyTest(
CompanyPermissionsAPITestCases,
):
pass

View File

@ -0,0 +1,46 @@
import pytest
from rest_framework.exceptions import ValidationError
from access.tests.functional.entity.test_functional_entity_serializer import (
MockView,
EntitySerializerInheritedCases
)
class CompanySerializerTestCases(
EntitySerializerInheritedCases
):
parameterized_test_data: dict = {
"name": {
'will_create': False,
'exception_key': 'required'
},
}
valid_data: dict = {
'name': 'Ian',
}
"""Valid data used by serializer to create object"""
class CompanySerializerInheritedCases(
CompanySerializerTestCases,
):
parameterized_test_data: dict = None
valid_data: dict = None
"""Valid data used by serializer to create object"""
class CompanySerializerPyTest(
CompanySerializerTestCases,
):
parameterized_test_data: dict = None

View File

@ -0,0 +1,58 @@
from django.test import TestCase
from access.models.company_base import Company
from access.tests.functional.entity.test_functional_entity_viewset import (
EntityViewSetInheritedCases
)
class ViewSetTestCases(
EntityViewSetInheritedCases,
):
add_data: dict = {
'name': 'Ian',
}
kwargs_create_item: dict = {
'name': 'Ian2',
}
kwargs_create_item_diff_org: dict = {
'name': 'Ian3',
}
model = Company
class CompanyViewSetInheritedCases(
ViewSetTestCases,
):
model = None
@classmethod
def setUpTestData(self):
self.kwargs_create_item = {
**super().kwargs_create_item,
**self.kwargs_create_item
}
self.kwargs_create_item_diff_org = {
**super().kwargs_create_item_diff_org,
**self.kwargs_create_item_diff_org
}
super().setUpTestData()
class CompanyViewSetTest(
ViewSetTestCases,
TestCase,
):
pass

View File

@ -0,0 +1,24 @@
import pytest
from access.models.contact import Contact
@pytest.fixture( scope = 'class')
def model(request):
request.cls.model = Contact
yield request.cls.model
del request.cls.model
@pytest.fixture(scope='function')
def create_serializer():
from access.serializers.entity_contact import ModelSerializer
yield ModelSerializer

View File

@ -0,0 +1,60 @@
from django.test import TestCase
from access.models.contact import Contact
from access.tests.functional.person.test_functional_person_history import (
PersonHistoryInheritedCases
)
class ContactTestCases(
PersonHistoryInheritedCases,
):
field_name = 'model_notes'
kwargs_create_obj: dict = {
'email': 'ipfunny@unit.test',
}
kwargs_delete_obj: dict = {
'email': 'ipweird@unit.test',
}
model = Contact
class ContactHistoryInheritedCases(
ContactTestCases,
):
model = None
"""Entity model to test"""
kwargs_create_obj: dict = None
kwargs_delete_obj: dict = None
@classmethod
def setUpTestData(self):
self.kwargs_create_obj.update(
super().kwargs_create_obj
)
self.kwargs_delete_obj.update(
super().kwargs_delete_obj
)
super().setUpTestData()
class ContactHistoryTest(
ContactTestCases,
TestCase,
):
pass

View File

@ -0,0 +1,65 @@
from django.test import TestCase
from access.models.contact import Contact
from access.tests.functional.person.test_functional_person_metadata import (
PersonMetadataInheritedCases
)
class ContactMetadataTestCases(
PersonMetadataInheritedCases,
):
add_data: dict = {
'email': 'ipfunny@unit.test',
}
kwargs_create_item: dict = {
'email': 'ipweird@unit.test',
}
kwargs_create_item_diff_org: dict = {
'email': 'ipstrange@unit.test',
}
model = Contact
class ContactMetadataInheritedCases(
ContactMetadataTestCases,
):
model = None
kwargs_create_item: dict = {}
kwargs_create_item_diff_org: dict = {}
@classmethod
def setUpTestData(self):
self.kwargs_create_item = {
**super().kwargs_create_item,
**self.kwargs_create_item
}
self.kwargs_create_item_diff_org = {
**super().kwargs_create_item_diff_org,
**self.kwargs_create_item_diff_org
}
super().setUpTestData()
class ContactMetadataTest(
ContactMetadataTestCases,
TestCase,
):
pass

View File

@ -0,0 +1,70 @@
import pytest
from access.tests.functional.person.test_functional_person_permission import (
PersonPermissionsAPIInheritedCases
)
class ContactPermissionsAPITestCases(
PersonPermissionsAPIInheritedCases,
):
add_data: dict = {
'email': 'ipfunny@unit.test',
}
kwargs_create_item: dict = {
'email': 'ipweird@unit.test',
}
kwargs_create_item_diff_org: dict = {
'email': 'ipstrange@unit.test',
}
class ContactPermissionsAPIInheritedCases(
ContactPermissionsAPITestCases,
):
add_data: dict = None
kwargs_create_item: dict = None
kwargs_create_item_diff_org: dict = None
# url_name = '_api_v2_entity_sub'
# @pytest.fixture(scope='class')
# def inherited_var_setup(self, request):
# request.cls.url_kwargs.update({
# 'entity_model': self.model._meta.sub_model_type
# })
# request.cls.url_view_kwargs.update({
# 'entity_model': self.model._meta.sub_model_type
# })
# @pytest.fixture(scope='class', autouse = True)
# def class_setup(self, request, django_db_blocker,
# model,
# var_setup,
# prepare,
# inherited_var_setup,
# diff_org_model,
# create_model,
# ):
# pass
class ContactPermissionsAPIPyTest(
ContactPermissionsAPITestCases,
):
pass

View File

@ -0,0 +1,46 @@
import pytest
from rest_framework.exceptions import ValidationError
from access.tests.functional.person.test_functional_person_serializer import (
MockView,
PersonSerializerInheritedCases
)
class ContactSerializerTestCases(
PersonSerializerInheritedCases
):
parameterized_test_data: dict = {
"email": {
'will_create': False,
'exception_key': 'required'
}
}
valid_data: dict = {
'email': 'contactentityduplicatetwo@unit.test',
}
"""Valid data used by serializer to create object"""
class ContactSerializerInheritedCases(
ContactSerializerTestCases,
):
parameterized_test_data: dict = None
valid_data: dict = None
"""Valid data used by serializer to create object"""
class ContactSerializerPyTest(
ContactSerializerTestCases,
):
parameterized_test_data: dict = None

View File

@ -0,0 +1,58 @@
from django.test import TestCase
from access.models.contact import Contact
from access.tests.functional.person.test_functional_person_viewset import (
PersonViewSetInheritedCases
)
class ViewSetTestCases(
PersonViewSetInheritedCases,
):
add_data: dict = {
'email': 'ipfunny@unit.test',
}
kwargs_create_item: dict = {
'email': 'ipweird@unit.test',
}
kwargs_create_item_diff_org: dict = {
'email': 'ipstrange@unit.test',
}
model = Contact
class ContactViewSetInheritedCases(
ViewSetTestCases,
):
model = None
@classmethod
def setUpTestData(self):
self.kwargs_create_item = {
**super().kwargs_create_item,
**self.kwargs_create_item
}
self.kwargs_create_item_diff_org = {
**super().kwargs_create_item_diff_org,
**self.kwargs_create_item_diff_org
}
super().setUpTestData()
class ContactViewSetTest(
ViewSetTestCases,
TestCase,
):
pass

View File

@ -0,0 +1,24 @@
import pytest
from access.models.entity import Entity
@pytest.fixture( scope = 'class')
def model(request):
request.cls.model = Entity
yield request.cls.model
del request.cls.model
@pytest.fixture(scope='function')
def create_serializer():
from access.serializers.entity import ModelSerializer
yield ModelSerializer

View File

@ -0,0 +1,78 @@
from django.test import TestCase
from access.models.entity_history import Entity, EntityAuditHistory
from core.tests.abstract.test_functional_history import HistoryEntriesCommon
class HistoryTestCases(
HistoryEntriesCommon,
):
field_name = 'model_notes'
history_model = EntityAuditHistory
kwargs_create_obj: dict = {}
kwargs_delete_obj: dict = {}
model = Entity
@classmethod
def setUpTestData(self):
super().setUpTestData()
self.obj = self.model.objects.create(
organization = self.organization,
model_notes = self.field_value_original,
**self.kwargs_create_obj,
)
self.obj_delete = self.model.objects.create(
organization = self.organization,
model_notes = 'another note',
**self.kwargs_delete_obj,
)
self.call_the_banners()
class EntityAuditHistoryInheritedCases(
HistoryTestCases,
):
model = None
"""Entity model to test"""
kwargs_create_obj: dict = None
kwargs_delete_obj: dict = None
@classmethod
def setUpTestData(self):
self.kwargs_create_obj.update(
super().kwargs_create_obj
)
self.kwargs_delete_obj.update(
super().kwargs_delete_obj
)
super().setUpTestData()
class EntityAuditHistoryTest(
HistoryTestCases,
TestCase,
):
pass

View File

@ -0,0 +1,260 @@
import django
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from access.models.entity import Entity
from access.models.tenant import Tenant as Organization
from access.models.team import Team
from access.models.team_user import TeamUsers
from accounting.models.asset_base import AssetBase
from api.tests.abstract.test_metadata_functional import MetadataAttributesFunctional
User = django.contrib.auth.get_user_model()
class EntityMetadataTestCases(
MetadataAttributesFunctional,
):
add_data: dict = {}
app_namespace = 'v2'
base_model = Entity
"""Base model for this sub model
don't change or override this value
"""
change_data = None
delete_data = {}
kwargs_create_item: dict = {}
kwargs_create_item_diff_org: dict = {}
model = Entity
url_kwargs: dict = {}
url_view_kwargs: dict = {}
url_name = None
@classmethod
def setUpTestData(self):
"""Setup Test
1. Create an organization for user and item
. create an organization that is different to item
2. Create a team
3. create teams with each permission: view, add, change, delete
4. create a user per team
"""
organization = Organization.objects.create(name='test_org')
self.organization = organization
self.different_organization = Organization.objects.create(name='test_different_organization')
self.view_user = User.objects.create_user(username="test_user_view", password="password")
self.item = self.model.objects.create(
organization = organization,
**self.kwargs_create_item
)
self.other_org_item = self.model.objects.create(
organization = self.different_organization,
**self.kwargs_create_item_diff_org
)
self.url_view_kwargs.update({ 'pk': self.item.id })
if self.add_data is not None:
self.add_data.update({
'organization': self.organization.id,
})
view_permissions = Permission.objects.get(
codename = 'view_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
view_team = Team.objects.create(
team_name = 'view_team',
organization = organization,
)
view_team.permissions.set([view_permissions])
add_permissions = Permission.objects.get(
codename = 'add_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
add_team = Team.objects.create(
team_name = 'add_team',
organization = organization,
)
add_team.permissions.set([add_permissions])
change_permissions = Permission.objects.get(
codename = 'change_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
change_team = Team.objects.create(
team_name = 'change_team',
organization = organization,
)
change_team.permissions.set([change_permissions])
delete_permissions = Permission.objects.get(
codename = 'delete_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
delete_team = Team.objects.create(
team_name = 'delete_team',
organization = organization,
)
delete_team.permissions.set([delete_permissions])
self.no_permissions_user = User.objects.create_user(username="test_no_permissions", password="password")
TeamUsers.objects.create(
team = view_team,
user = self.view_user
)
self.add_user = User.objects.create_user(username="test_user_add", password="password")
TeamUsers.objects.create(
team = add_team,
user = self.add_user
)
self.change_user = User.objects.create_user(username="test_user_change", password="password")
TeamUsers.objects.create(
team = change_team,
user = self.change_user
)
self.delete_user = User.objects.create_user(username="test_user_delete", password="password")
TeamUsers.objects.create(
team = delete_team,
user = self.delete_user
)
self.different_organization_user = User.objects.create_user(username="test_different_organization_user", password="password")
different_organization_team = Team.objects.create(
team_name = 'different_organization_team',
organization = self.different_organization,
)
different_organization_team.permissions.set([
view_permissions,
add_permissions,
change_permissions,
delete_permissions,
])
TeamUsers.objects.create(
team = different_organization_team,
user = self.different_organization_user
)
def test_sanity_is_entity_sub_model(self):
"""Sanity Test
This test ensures that the model being tested `self.model` is a
sub-model of `self.base_model`.
This test is required as the same viewset is used for all sub-models
of `AssetBase`
"""
assert issubclass(self.model, self.base_model)
class EntityMetadataInheritedCases(
EntityMetadataTestCases,
):
model = None
kwargs_create_item: dict = {}
kwargs_create_item_diff_org: dict = {}
url_name = '_api_v2_entity_sub'
@classmethod
def setUpTestData(self):
self.kwargs_create_item = {
**super().kwargs_create_item,
**self.kwargs_create_item
}
self.kwargs_create_item_diff_org = {
**super().kwargs_create_item_diff_org,
**self.kwargs_create_item_diff_org
}
self.url_kwargs = {
'entity_model': self.model._meta.sub_model_type
}
self.url_view_kwargs = {
'entity_model': self.model._meta.sub_model_type
}
super().setUpTestData()
class EntityMetadataTest(
EntityMetadataTestCases,
TestCase,
):
url_name = '_api_v2_entity'

View File

@ -0,0 +1,89 @@
import pytest
from api.tests.functional.test_functional_api_permissions import (
APIPermissionsInheritedCases,
)
class EntityPermissionsAPITestCases(
APIPermissionsInheritedCases,
):
add_data: dict = {}
app_namespace = 'v2'
change_data = {}
delete_data = {}
kwargs_create_item: dict = {}
kwargs_create_item_diff_org: dict = {}
url_kwargs: dict = {}
url_name = '_api_v2_entity'
url_view_kwargs: dict = {}
def test_returned_data_from_user_and_global_organizations_only(self):
"""Check items returned
This test case is a over-ride of a test case with the same name.
This model is not a tenancy model making this test not-applicable.
Items returned from the query Must be from the users organization and
global ONLY!
"""
pass
class EntityPermissionsAPIInheritedCases(
EntityPermissionsAPITestCases,
):
add_data: dict = None
kwargs_create_item: dict = None
kwargs_create_item_diff_org: dict = None
url_name = '_api_v2_entity_sub'
@pytest.fixture(scope='class')
def inherited_var_setup(self, request):
request.cls.url_kwargs.update({
'entity_model': self.model._meta.sub_model_type
})
request.cls.url_view_kwargs.update({
'entity_model': self.model._meta.sub_model_type
})
@pytest.fixture(scope='class', autouse = True)
def class_setup(self, request, django_db_blocker,
model,
var_setup,
prepare,
inherited_var_setup,
diff_org_model,
create_model,
):
pass
class EntityPermissionsAPIPyTest(
EntityPermissionsAPITestCases,
):
pass

View File

@ -0,0 +1,213 @@
import django
import pytest
from rest_framework.exceptions import ValidationError
User = django.contrib.auth.get_user_model()
class MockView:
_has_import: bool = False
"""User Permission
get_permission_required() sets this to `True` when user has import permission.
"""
_has_purge: bool = False
"""User Permission
get_permission_required() sets this to `True` when user has purge permission.
"""
_has_triage: bool = False
"""User Permission
get_permission_required() sets this to `True` when user has triage permission.
"""
class EntitySerializerTestCases:
parameterized_test_data: dict = {
"model_notes": {
'will_create': True,
}
}
valid_data: dict = {
'model_notes': 'model notes field'
}
"""Valid data used by serializer to create object"""
@pytest.fixture( scope = 'class')
def setup_data(self,
request,
model,
django_db_blocker,
organization_one,
):
with django_db_blocker.unblock():
request.cls.organization = organization_one
valid_data = {}
for base in reversed(request.cls.__mro__):
if hasattr(base, 'valid_data'):
if base.valid_data is None:
continue
valid_data.update(**base.valid_data)
if len(valid_data) > 0:
request.cls.valid_data = valid_data
if 'organization' not in request.cls.valid_data:
request.cls.valid_data.update({
'organization': request.cls.organization.pk
})
request.cls.view_user = User.objects.create_user(username="cafs_test_user_view", password="password")
yield
with django_db_blocker.unblock():
request.cls.view_user.delete()
del request.cls.valid_data
@pytest.fixture( scope = 'class', autouse = True)
def class_setup(self,
setup_data,
):
pass
def test_serializer_valid_data(self, create_serializer):
"""Serializer Validation Check
Ensure that when creating an object with valid data, no validation
error occurs.
"""
view_set = MockView()
serializer = create_serializer(
context = {
'view': view_set,
},
data = self.valid_data
)
assert serializer.is_valid(raise_exception = True)
def test_serializer_valid_data_missing_field_is_valid(self, parameterized, param_key_test_data,
create_serializer,
param_value,
param_will_create,
):
"""Serializer Validation Check
Ensure that when creating an object with a user with import permission
and with valid data, no validation error occurs.
"""
valid_data = self.valid_data.copy()
del valid_data[param_value]
view_set = MockView()
view_set._has_import = True
serializer = create_serializer(
context = {
'view': view_set,
},
data = valid_data
)
is_valid = serializer.is_valid(raise_exception = False)
assert (
(
not param_will_create
and param_will_create == is_valid
)
or param_will_create == is_valid
)
class EntitySerializerInheritedCases(
EntitySerializerTestCases,
):
parameterized_test_data: dict = None
model = None
"""Model to test"""
valid_data: dict = None
"""Valid data used by serializer to create object"""
def test_serializer_valid_data_missing_field_raises_exception(self, parameterized, param_key_test_data,
create_serializer,
param_value,
param_exception_key,
):
"""Serializer Validation Check
Ensure that when creating an object with a user with import permission
and with valid data, no validation error occurs.
"""
valid_data = self.valid_data.copy()
del valid_data[param_value]
view_set = MockView()
with pytest.raises(ValidationError) as err:
serializer = create_serializer(
context = {
'view': view_set,
},
data = valid_data
)
is_valid = serializer.is_valid(raise_exception = True)
assert err.value.get_codes()[param_value][0] == param_exception_key
class EntitySerializerPyTest(
EntitySerializerTestCases,
):
parameterized_test_data: dict = None

View File

@ -0,0 +1,266 @@
import django
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from access.models.entity import Entity
from access.models.tenant import Tenant as Organization
from access.models.team import Team
from access.models.team_user import TeamUsers
from api.tests.abstract.api_serializer_viewset import SerializersTestCases
User = django.contrib.auth.get_user_model()
class ViewSetBase:
add_data: dict = {
'model_notes': 'added model note'
}
app_namespace = 'v2'
base_model = Entity
"""Base model for this sub model
don't change or override this value
"""
change_data = None
delete_data = {}
kwargs_create_item: dict = {
'model_notes': 'added model note'
}
kwargs_create_item_diff_org: dict = {
'model_notes': 'added model note'
}
model = None
url_kwargs: dict = {}
url_view_kwargs: dict = {}
url_name = None
@classmethod
def setUpTestData(self):
"""Setup Test
1. Create an organization for user and item
. create an organization that is different to item
2. Create a team
3. create teams with each permission: view, add, change, delete
4. create a user per team
"""
organization = Organization.objects.create(name='test_org')
self.organization = organization
self.different_organization = Organization.objects.create(name='test_different_organization')
self.view_user = User.objects.create_user(username="test_user_view", password="password")
self.item = self.model.objects.create(
organization = organization,
**self.kwargs_create_item
)
self.other_org_item = self.model.objects.create(
organization = self.different_organization,
**self.kwargs_create_item_diff_org
)
self.url_view_kwargs.update({ 'pk': self.item.id })
if self.add_data is not None:
self.add_data.update({
'organization': self.organization.id,
})
view_permissions = Permission.objects.get(
codename = 'view_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
view_team = Team.objects.create(
team_name = 'view_team',
organization = organization,
)
view_team.permissions.set([view_permissions])
add_permissions = Permission.objects.get(
codename = 'add_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
add_team = Team.objects.create(
team_name = 'add_team',
organization = organization,
)
add_team.permissions.set([add_permissions])
change_permissions = Permission.objects.get(
codename = 'change_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
change_team = Team.objects.create(
team_name = 'change_team',
organization = organization,
)
change_team.permissions.set([change_permissions])
delete_permissions = Permission.objects.get(
codename = 'delete_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
delete_team = Team.objects.create(
team_name = 'delete_team',
organization = organization,
)
delete_team.permissions.set([delete_permissions])
self.no_permissions_user = User.objects.create_user(username="test_no_permissions", password="password")
TeamUsers.objects.create(
team = view_team,
user = self.view_user
)
self.add_user = User.objects.create_user(username="test_user_add", password="password")
TeamUsers.objects.create(
team = add_team,
user = self.add_user
)
self.change_user = User.objects.create_user(username="test_user_change", password="password")
TeamUsers.objects.create(
team = change_team,
user = self.change_user
)
self.delete_user = User.objects.create_user(username="test_user_delete", password="password")
TeamUsers.objects.create(
team = delete_team,
user = self.delete_user
)
self.different_organization_user = User.objects.create_user(username="test_different_organization_user", password="password")
different_organization_team = Team.objects.create(
team_name = 'different_organization_team',
organization = self.different_organization,
)
different_organization_team.permissions.set([
view_permissions,
add_permissions,
change_permissions,
delete_permissions,
])
TeamUsers.objects.create(
team = different_organization_team,
user = self.different_organization_user
)
def test_sanity_is_asset_sub_model(self):
"""Sanity Test
This test ensures that the model being tested `self.model` is a
sub-model of `self.base_model`.
This test is required as the same viewset is used for all sub-models
of `Entity`
"""
assert issubclass(self.model, self.base_model)
class ViewSetTestCases(
ViewSetBase,
SerializersTestCases,
):
model = Entity
class EntityViewSetInheritedCases(
ViewSetTestCases,
):
model = None
url_name = '_api_v2_entity_sub'
@classmethod
def setUpTestData(self):
self.kwargs_create_item = {
**super().kwargs_create_item,
**self.kwargs_create_item
}
self.kwargs_create_item_diff_org = {
**super().kwargs_create_item_diff_org,
**self.kwargs_create_item_diff_org
}
self.url_kwargs = {
'entity_model': self.model._meta.sub_model_type
}
self.url_view_kwargs = {
'entity_model': self.model._meta.sub_model_type
}
super().setUpTestData()
class EntityViewSetTest(
ViewSetTestCases,
TestCase,
):
url_name = '_api_v2_entity'

View File

@ -0,0 +1,81 @@
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from access.models.entity_notes import Entity, EntityNotes
from core.tests.abstract.model_notes_api_fields import ModelNotesNotesAPIFields
class NotesAPITestCases(
ModelNotesNotesAPIFields,
):
entity_model = None
model = EntityNotes
kwargs_model_create: dict = None
# url_view_kwargs: dict = None
view_name: str = '_api_v2_entity_note'
@classmethod
def setUpTestData(self):
"""Setup Test
1. Call parent setup
2. Create a model note
3. add url kwargs
4. make the API request
"""
super().setUpTestData()
self.item = self.model.objects.create(
organization = self.organization,
content = 'a random comment',
content_type = ContentType.objects.get(
app_label = str(self.model._meta.app_label).lower(),
model = str(self.model.model.field.related_model.__name__).replace(' ', '').lower(),
),
model = self.entity_model.objects.create(
organization = self.organization,
model_notes = 'text',
**self.kwargs_model_create
),
created_by = self.view_user,
modified_by = self.view_user,
)
self.url_view_kwargs = {
'model_id': self.item.model.pk,
'pk': self.item.pk
}
self.make_request()
class EntityNotesAPIInheritedCases(
NotesAPITestCases,
):
entity_model = None
kwargs_model_create = None
class EntityNotesAPITest(
NotesAPITestCases,
TestCase,
):
entity_model = Entity
kwargs_model_create = {}

View File

@ -0,0 +1,162 @@
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from access.viewsets.entity_notes import ViewSet
from core.tests.abstract.test_functional_notes_viewset import (
ModelNotesViewSetBase,
ModelNotesMetadata,
ModelNotesPermissionsAPI,
ModelNotesSerializer
)
class ViewSetBase(
ModelNotesViewSetBase
):
viewset = ViewSet
kwargs_create_model_item: dict = {}
kwargs_create_model_item_other_org: dict = {}
url_name = '_api_v2_entity_note'
@classmethod
def setUpTestData(self):
super().setUpTestData()
self.item = self.viewset.model.objects.create(
organization = self.organization,
content = 'a random comment',
content_type = ContentType.objects.get(
app_label = str(self.model._meta.app_label).lower(),
model = str(self.model.model.field.related_model.__name__).replace(' ', '').lower(),
),
model = self.viewset.model.model.field.related_model.objects.create(
organization = self.organization,
model_notes = 'text',
**self.kwargs_create_model_item
),
created_by = self.view_user,
modified_by = self.view_user,
)
self.other_org_item = self.viewset.model.objects.create(
organization = self.different_organization,
content = 'a random comment',
content_type = ContentType.objects.get(
app_label = str(self.model._meta.app_label).lower(),
model = str(self.model.model.field.related_model.__name__).replace(' ', '').lower(),
),
model = self.viewset.model.model.field.related_model.objects.create(
organization = self.organization,
model_notes = 'text',
**self.kwargs_create_model_item_other_org
),
created_by = self.view_user,
modified_by = self.view_user,
)
self.url_kwargs = {
'model_id': self.item.model.pk,
}
self.url_view_kwargs = {
'model_id': self.item.model.pk,
'pk': self.item.id
}
class NotesPermissionsAPITestCases(
ViewSetBase,
ModelNotesPermissionsAPI,
):
viewset = None
def test_returned_data_from_user_and_global_organizations_only(self):
"""Check items returned
This test case is a over-ride of a test case with the same name.
This model is not a global model making this test not-applicable.
Items returned from the query Must be from the users organization and
global ONLY!
"""
pass
class EntityNotesPermissionsAPIInheritedCases(
NotesPermissionsAPITestCases,
):
viewset = None
class EntityNotesPermissionsAPITest(
NotesPermissionsAPITestCases,
TestCase,
):
viewset = ViewSet
class NotesSerializerTestCases(
ViewSetBase,
ModelNotesSerializer,
):
viewset = None
class EntityNotesSerializerInheritedCases(
NotesSerializerTestCases,
):
viewset = None
class EntityNotesSerializerTest(
NotesSerializerTestCases,
TestCase,
):
viewset = ViewSet
class NotesMetadataTestCases(
ViewSetBase,
ModelNotesMetadata,
):
viewset = None
class EntityNotesMetadataInheritedCases(
NotesMetadataTestCases,
):
viewset = None
class EntityNotesMetadataTest(
NotesMetadataTestCases,
TestCase,
):
viewset = ViewSet

View File

@ -0,0 +1,32 @@
from django.test import TestCase
from access.models.organization_history import Tenant as Organization, OrganizationAuditHistory
from core.tests.abstract.test_functional_history import HistoryEntriesCommon
class History(
HistoryEntriesCommon,
TestCase,
):
model = Organization
history_model = OrganizationAuditHistory
@classmethod
def setUpTestData(self):
super().setUpTestData()
self.obj = self.model.objects.create(
name = self.field_value_original,
)
self.obj_delete = self.model.objects.create(
name = self.field_value_delete,
)
self.call_the_banners()

View File

@ -0,0 +1,94 @@
import django
import pytest
from django.test import TestCase
from rest_framework.exceptions import ValidationError
from access.serializers.organization import (
Tenant,
TenantModelSerializer
)
User = django.contrib.auth.get_user_model()
class OrganizationValidationAPI(
TestCase,
):
model = Tenant
@classmethod
def setUpTestData(self):
"""Setup Test
1. Create an org
2. Create an item
"""
self.user = User.objects.create(username = 'org_user', password='random password')
self.valid_data = {
'name': 'valid_org_data',
'manager': self.user.id
}
self.item = self.model.objects.create(
name = 'random title',
)
def test_serializer_valid_data(self):
"""Serializer Validation Check
Ensure that if creating and no name is provided a validation error occurs
"""
serializer = TenantModelSerializer(
data = self.valid_data
)
assert serializer.is_valid(raise_exception = True)
def test_serializer_validation_no_name(self):
"""Serializer Validation Check
Ensure that if creating and no name is provided a validation error occurs
"""
data = self.valid_data.copy()
del data['name']
with pytest.raises(ValidationError) as err:
serializer = TenantModelSerializer(
data = data
)
serializer.is_valid(raise_exception = True)
assert err.value.get_codes()['name'][0] == 'required'
def test_serializer_validation_manager_optional(self):
"""Serializer Validation Check
Ensure that if creating and no name is provided a validation error occurs
"""
data = self.valid_data.copy()
del data['manager']
serializer = TenantModelSerializer(
data = data
)
assert serializer.is_valid(raise_exception = True)

View File

@ -0,0 +1,321 @@
import django
import pytest
import unittest
import requests
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser, Permission
from django.contrib.contenttypes.models import ContentType
from django.shortcuts import reverse
from django.test import Client, TestCase
from access.models.tenant import Tenant as Organization
from access.models.team import Team
from access.models.team_user import TeamUsers
from api.tests.abstract.api_permissions_viewset import APIPermissions
from api.tests.abstract.api_serializer_viewset import SerializersTestCases
from api.tests.abstract.test_metadata_functional import MetadataAttributesFunctional, MetaDataNavigationEntriesFunctional
User = django.contrib.auth.get_user_model()
class ViewSetBase:
model = Organization
app_namespace = 'v2'
url_name = '_api_v2_organization'
change_data = {'name': 'device'}
delete_data = {}
@classmethod
def setUpTestData(self):
"""Setup Test
1. Create an organization for user and item
. create an organization that is different to item
2. Create a team
3. create teams with each permission: view, add, change, delete
4. create a user per team
"""
organization = Organization.objects.create(name='test_org')
self.organization = organization
self.item = organization
different_organization = Organization.objects.create(name='test_different_organization')
self.different_organization = different_organization
self.other_org_item = organization
view_permissions = Permission.objects.get(
codename = 'view_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
view_team = Team.objects.create(
team_name = 'view_team',
organization = organization,
)
view_team_b = Team.objects.create(
team_name = 'view_team',
organization = different_organization,
)
view_team.permissions.set([view_permissions])
view_team_b.permissions.set([view_permissions])
add_permissions = Permission.objects.get(
codename = 'add_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
add_team = Team.objects.create(
team_name = 'add_team',
organization = organization,
)
add_team.permissions.set([add_permissions])
change_permissions = Permission.objects.get(
codename = 'change_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
change_team = Team.objects.create(
team_name = 'change_team',
organization = organization,
)
change_team.permissions.set([change_permissions])
delete_permissions = Permission.objects.get(
codename = 'delete_' + self.model._meta.model_name,
content_type = ContentType.objects.get(
app_label = self.model._meta.app_label,
model = self.model._meta.model_name,
)
)
delete_team = Team.objects.create(
team_name = 'delete_team',
organization = organization,
)
delete_team.permissions.set([delete_permissions])
self.no_permissions_user = User.objects.create_user(username="test_no_permissions", password="password")
self.view_user = User.objects.create_user(username="test_user_view", password="password")
teamuser = TeamUsers.objects.create(
team = view_team,
user = self.view_user
)
self.view_user_b = User.objects.create_user(username="test_user_view_b", password="password")
teamuser = TeamUsers.objects.create(
team = view_team_b,
user = self.view_user_b
)
self.url_view_kwargs = { 'pk': self.item.id }
self.add_data = {
'name': 'team_post',
}
self.super_add_user = User.objects.create_user(username="test_user_add_super", password="password", is_superuser = True)
self.add_user = User.objects.create_user(username="test_user_add", password="password")
teamuser = TeamUsers.objects.create(
team = add_team,
user = self.add_user
)
self.change_user = User.objects.create_user(username="test_user_change", password="password")
teamuser = TeamUsers.objects.create(
team = change_team,
user = self.change_user
)
self.delete_user = User.objects.create_user(username="test_user_delete", password="password")
teamuser = TeamUsers.objects.create(
team = delete_team,
user = self.delete_user
)
self.different_organization_user = User.objects.create_user(username="test_different_organization_user", password="password")
different_organization_team = Team.objects.create(
team_name = 'different_organization_team',
organization = different_organization,
)
different_organization_team.permissions.set([
view_permissions,
add_permissions,
change_permissions,
delete_permissions,
])
TeamUsers.objects.create(
team = different_organization_team,
user = self.different_organization_user
)
class OrganizationPermissionsAPI(
ViewSetBase,
APIPermissions,
TestCase
):
def test_returned_data_from_user_and_global_organizations_only(self):
"""Check items returned
This test case is a over-ride of a test case with the same name.
This model is not a tenancy model making this test not-applicable.
Items returned from the query Must be from the users organization and
global ONLY!
"""
pass
def test_add_has_permission(self):
""" Check correct permission for add
Attempt to add as user with permission
"""
client = Client()
if self.url_kwargs:
url = reverse( self.app_namespace + ':' + self.url_name + '-list', kwargs = self.url_kwargs )
else:
url = reverse( self.app_namespace + ':' + self.url_name + '-list' )
client.force_login( self.add_user )
response = client.post( url, data = self.add_data )
assert response.status_code == 201
def test_returned_results_only_user_orgs(self):
"""Returned results check
This test case is an override of a test of the same name.
organizations are not tenancy objects and therefor are supposed to
return all items when a user queries them.
Ensure that a query to the viewset endpoint does not return
items that are not part of the users organizations.
"""
# Ensure the other org item exists, without test not able to function
print('Check that the different organization item has been defined')
assert hasattr(self, 'other_org_item')
# ensure that the variables for the two orgs are different orgs
print('checking that the different and user oganizations are different')
assert self.different_organization.id != self.organization.id
client = Client()
if self.url_kwargs:
url = reverse(self.app_namespace + ':' + self.url_name + '-list', kwargs = self.url_kwargs)
else:
url = reverse(self.app_namespace + ':' + self.url_name + '-list')
client.force_login(self.view_user)
response = client.get(url)
contains_different_org: bool = False
# for item in response.data['results']:
# if int(item['id']) != self.organization.id:
# contains_different_org = True
assert len(response.data['results']) == 2
def test_add_different_organization_denied(self):
""" Check correct permission for add
This test is a duplicate of a test case with the same name.
Organizations are not tenancy models so this test does nothing of value
attempt to add as user from different organization
"""
pass
class OrganizationViewSet(
ViewSetBase,
SerializersTestCases,
TestCase
):
pass
class OrganizationMetadata(
ViewSetBase,
MetadataAttributesFunctional,
MetaDataNavigationEntriesFunctional,
TestCase
):
menu_id = 'access'
menu_entry_id = 'tenant'

View File

@ -0,0 +1,116 @@
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from access.viewsets.organization_notes import ViewSet
from core.tests.abstract.test_functional_notes_viewset import (
ModelNotesViewSetBase,
ModelNotesMetadata,
ModelNotesPermissionsAPI,
ModelNotesSerializer
)
class ViewSetBase(
ModelNotesViewSetBase
):
viewset = ViewSet
url_name = '_api_v2_organization_note'
@classmethod
def setUpTestData(self):
super().setUpTestData()
self.item = self.viewset.model.objects.create(
organization = self.organization,
content = 'a random comment',
content_type = ContentType.objects.get(
app_label = str(self.model._meta.app_label).lower(),
model = str(self.model.model.field.related_model.__name__).replace(' ', '').lower(),
),
model = self.organization,
created_by = self.view_user,
modified_by = self.view_user,
)
self.other_org_item = self.viewset.model.objects.create(
organization = self.different_organization,
content = 'a random comment',
content_type = ContentType.objects.get(
app_label = str(self.model._meta.app_label).lower(),
model = str(self.model.model.field.related_model.__name__).replace(' ', '').lower(),
),
model = self.different_organization,
created_by = self.view_user,
modified_by = self.view_user,
)
self.global_org_item = self.viewset.model.objects.create(
organization = self.global_organization,
content = 'a random comment global_organization',
content_type = ContentType.objects.get(
app_label = str(self.model._meta.app_label).lower(),
model = str(self.model.model.field.related_model.__name__).replace(' ', '').lower(),
),
model = self.global_organization,
created_by = self.view_user,
modified_by = self.view_user,
)
self.url_kwargs = {
'model_id': self.item.model.pk,
}
self.url_view_kwargs = {
'model_id': self.item.model.pk,
'pk': self.item.id
}
class OrganizationModelNotesPermissionsAPI(
ViewSetBase,
ModelNotesPermissionsAPI,
TestCase,
):
def test_returned_data_from_user_and_global_organizations_only(self):
"""Check items returned
This test case is a over-ride of a test case with the same name.
This model is not a global model making this test not-applicable.
Items returned from the query Must be from the users organization and
global ONLY!
"""
pass
class OrganizationModelNotesSerializer(
ViewSetBase,
ModelNotesSerializer,
TestCase,
):
pass
class OrganizationModelNotesMetadata(
ViewSetBase,
ModelNotesMetadata,
TestCase,
):
pass

View File

@ -0,0 +1,53 @@
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from core.tests.abstract.model_notes_api_fields import ModelNotesNotesAPIFields
from access.models.tenant import Tenant as Organization
from access.models.organization_notes import OrganizationNotes
class OrganizationNotesAPI(
ModelNotesNotesAPIFields,
TestCase,
):
model = OrganizationNotes
view_name: str = '_api_v2_organization_note'
@classmethod
def setUpTestData(self):
"""Setup Test
1. Call parent setup
2. Create a model note
3. add url kwargs
4. make the API request
"""
super().setUpTestData()
self.item = self.model.objects.create(
organization = self.organization,
content = 'a random comment',
content_type = ContentType.objects.get(
app_label = str(self.model._meta.app_label).lower(),
model = str(self.model.model.field.related_model.__name__).replace(' ', '').lower(),
),
model = Organization.objects.create(
name = 'dev'
),
created_by = self.view_user,
modified_by = self.view_user,
)
self.url_view_kwargs = {
'model_id': self.item.model.pk,
'pk': self.item.pk
}
self.make_request()

View File

@ -0,0 +1,24 @@
import pytest
from access.models.person import Person
@pytest.fixture( scope = 'class')
def model(request):
request.cls.model = Person
yield request.cls.model
del request.cls.model
@pytest.fixture(scope='function')
def create_serializer():
from access.serializers.entity_person import ModelSerializer
yield ModelSerializer

View File

@ -0,0 +1,65 @@
from django.test import TestCase
from access.models.person import Person
from access.tests.functional.entity.test_functional_entity_history import (
EntityAuditHistoryInheritedCases
)
class PersonTestCases(
EntityAuditHistoryInheritedCases,
):
field_name = 'model_notes'
kwargs_create_obj: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Funny',
'dob': '2025-04-08',
}
kwargs_delete_obj: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Weird',
'dob': '2025-04-08',
}
model = Person
class PersonHistoryInheritedCases(
PersonTestCases,
):
model = None
"""Entity model to test"""
kwargs_create_obj: dict = None
kwargs_delete_obj: dict = None
@classmethod
def setUpTestData(self):
self.kwargs_create_obj.update(
super().kwargs_create_obj
)
self.kwargs_delete_obj.update(
super().kwargs_delete_obj
)
super().setUpTestData()
class PersonHistoryTest(
PersonTestCases,
TestCase,
):
pass

View File

@ -0,0 +1,83 @@
from django.test import TestCase
from access.models.person import Person
from access.tests.functional.entity.test_functional_entity_metadata import (
EntityMetadataInheritedCases
)
from accounting.models.asset_base import AssetBase
class PersonMetadataTestCases(
EntityMetadataInheritedCases,
):
add_data: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Strange',
'dob': '2025-04-08',
}
kwargs_create_item: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Weird',
'dob': '2025-04-08',
}
kwargs_create_item_diff_org: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Funny',
'dob': '2025-04-08',
}
model = Person
class PersonMetadataInheritedCases(
PersonMetadataTestCases,
):
model = None
kwargs_create_item: dict = {}
kwargs_create_item_diff_org: dict = {}
@classmethod
def setUpTestData(self):
self.kwargs_create_item = {
**super().kwargs_create_item,
**self.kwargs_create_item
}
self.kwargs_create_item_diff_org = {
**super().kwargs_create_item_diff_org,
**self.kwargs_create_item_diff_org
}
# self.url_kwargs = {
# 'entity_model': self.model._meta.sub_model_type
# }
# self.url_view_kwargs = {
# 'entity_model': self.model._meta.sub_model_type
# }
super().setUpTestData()
class PersonMetadataTest(
PersonMetadataTestCases,
TestCase,
):
pass

View File

@ -0,0 +1,91 @@
import pytest
from access.tests.functional.entity.test_functional_entity_permission import (
EntityPermissionsAPIInheritedCases
)
class PersonPermissionsAPITestCases(
EntityPermissionsAPIInheritedCases,
):
add_data: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Strange',
'dob': '2025-04-08',
}
# app_namespace = 'v2'
# change_data = {}
# delete_data = {}
kwargs_create_item: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Weird',
'dob': '2025-04-08',
}
kwargs_create_item_diff_org: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Funny',
'dob': '2025-04-08',
}
# url_kwargs: dict = {}
# url_name = '_api_v2_entity'
# url_view_kwargs: dict = {}
class PersonPermissionsAPIInheritedCases(
PersonPermissionsAPITestCases,
):
add_data: dict = None
kwargs_create_item: dict = None
kwargs_create_item_diff_org: dict = None
# url_name = '_api_v2_entity_sub'
# @pytest.fixture(scope='class')
# def inherited_var_setup(self, request):
# request.cls.url_kwargs.update({
# 'entity_model': self.model._meta.sub_model_type
# })
# request.cls.url_view_kwargs.update({
# 'entity_model': self.model._meta.sub_model_type
# })
# @pytest.fixture(scope='class', autouse = True)
# def class_setup(self, request, django_db_blocker,
# model,
# var_setup,
# prepare,
# inherited_var_setup,
# diff_org_model,
# create_model,
# ):
# pass
class PersonPermissionsAPIPyTest(
PersonPermissionsAPITestCases,
):
pass

View File

@ -0,0 +1,111 @@
import pytest
from rest_framework.exceptions import ValidationError
from access.tests.functional.entity.test_functional_entity_serializer import (
MockView,
EntitySerializerInheritedCases
)
class PersonSerializerTestCases(
EntitySerializerInheritedCases
):
parameterized_test_data: dict = {
"model_notes": {
'will_create': True,
},
"f_name": {
'will_create': False,
'exception_key': 'required'
},
"m_name": {
'will_create': True,
},
"l_name": {
'will_create': False,
'exception_key': 'required'
},
"dob": {
'will_create': True,
}
}
valid_data: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Funny',
'dob': '2025-04-08',
}
"""Valid data used by serializer to create object"""
def test_serializer_validation_duplicate_f_name_l_name_dob(self, model, create_serializer):
"""Serializer Validation Check
Ensure that when creating with valid data and fields f_name, l_name and
dob already exists in the db a validation error occurs.
"""
valid_data = self.valid_data.copy()
valid_data['f_name'] = 'duplicate'
valid_data['organization'] = self.organization
obj = model.objects.create(
**valid_data
)
valid_data['organization'] = self.organization.id
if 'email' in valid_data: # Contact Entity
valid_data['email'] = 'abc@xyz.qwe'
if 'name' in valid_data: # Company Entity
valid_data['name'] = 'diff'
if 'employee_number' in valid_data: # Employee Entity
valid_data['employee_number'] = 13579
view_set = MockView()
with pytest.raises(ValidationError) as err:
serializer = create_serializer(
context = {
'view': view_set,
},
data = valid_data
)
serializer.is_valid(raise_exception = True)
serializer.save()
assert err.value.get_codes()['dob'] == 'duplicate_person_on_dob'
class PersonSerializerInheritedCases(
PersonSerializerTestCases,
):
parameterized_test_data: dict = None
valid_data: dict = None
"""Valid data used by serializer to create object"""
class PersonSerializerPyTest(
PersonSerializerTestCases,
):
parameterized_test_data: dict = None

View File

@ -0,0 +1,67 @@
from django.test import TestCase
from access.models.person import Person
from access.tests.functional.entity.test_functional_entity_viewset import (
EntityViewSetInheritedCases
)
class ViewSetTestCases(
EntityViewSetInheritedCases,
):
add_data: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Strange',
'dob': '2025-04-08',
}
kwargs_create_item: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Weird',
'dob': '2025-04-08',
}
kwargs_create_item_diff_org: dict = {
'f_name': 'Ian',
'm_name': 'Peter',
'l_name': 'Funny',
'dob': '2025-04-08',
}
model = Person
class PersonViewSetInheritedCases(
ViewSetTestCases,
):
model = None
@classmethod
def setUpTestData(self):
self.kwargs_create_item = {
**super().kwargs_create_item,
**self.kwargs_create_item
}
self.kwargs_create_item_diff_org = {
**super().kwargs_create_item_diff_org,
**self.kwargs_create_item_diff_org
}
super().setUpTestData()
class PersonViewSetTest(
ViewSetTestCases,
TestCase,
):
pass

Some files were not shown because too many files have changed in this diff Show More