Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: version 1.4 #344

Open
wants to merge 503 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
503 commits
Select commit Hold shift + click to select a range
251fdcf
test(itam): Operating System Version API field checks
jon-nfc Oct 20, 2024
cfc6b64
test(itam): Operating System Version Serializer Validation checks
jon-nfc Oct 20, 2024
dc7a9fa
test(itam): Operating System Version API ViewSet permission checks
jon-nfc Oct 20, 2024
d95afb2
test(itam): Software Category Version API field checks
jon-nfc Oct 20, 2024
22f470f
test(itam): Software Category Serializer Validation checks
jon-nfc Oct 20, 2024
a320553
test(itam): Software Category Version API ViewSet permission checks
jon-nfc Oct 20, 2024
5660dbe
test(itam): Software Version API field checks
jon-nfc Oct 20, 2024
098e176
test(itam): Software Version Serializer Validation checks
jon-nfc Oct 20, 2024
bcf4aa1
test(itam): Software Version API ViewSet permission checks
jon-nfc Oct 20, 2024
08cf4cd
test(itam): Software Version Tenancy Model Checks
jon-nfc Oct 20, 2024
53fcf1e
test(itam): Device Type API field checks
jon-nfc Oct 20, 2024
3cd6182
test(itam): Device Type Serializer Validation checks
jon-nfc Oct 20, 2024
ebf7302
fix(itam): Ensure software version model has page_layout field
jon-nfc Oct 20, 2024
a12cd0d
test(itam): Device Type API ViewSet permission checks
jon-nfc Oct 20, 2024
9a7306e
test(itam): Device Model API field checks
jon-nfc Oct 20, 2024
ad61251
test(itam): Device Model Serializer Validation checks
jon-nfc Oct 20, 2024
c27fd42
test(itam): Device Model API ViewSet permission checks
jon-nfc Oct 20, 2024
89b8397
fix(itam): Don't attempt to include manufacturer in name for Device M…
jon-nfc Oct 20, 2024
1e99638
test(itam): Device Software API field checks
jon-nfc Oct 20, 2024
da8c53b
test(itam): Device Software Serializer Validation checks
jon-nfc Oct 20, 2024
f5a3af4
test(itam): Device Software API ViewSet permission checks
jon-nfc Oct 20, 2024
2980cb7
feat(itam): Depreciate API v1 Software Endpoint
jon-nfc Oct 20, 2024
eddc8ba
feat(itim): Add Service API v2 endpoint
jon-nfc Oct 21, 2024
585434b
feat(itim): Add Cluster Type API v2 endpoint
jon-nfc Oct 21, 2024
f11d9cc
feat(itim): Add Cluster API v2 endpoint
jon-nfc Oct 21, 2024
69679d7
feat(itim): Add Port API v2 endpoint
jon-nfc Oct 21, 2024
d1a2b0d
test(itam): Device Service API field checks
jon-nfc Oct 21, 2024
53d9e1b
test(itam): remove Device Ticket API field checks
jon-nfc Oct 21, 2024
55c4d5b
fix(itim): Correct Device Service API v2 endpoint
jon-nfc Oct 21, 2024
fbe4686
feat(itim): Ensure cluster cant assign itself as parent on api v2 end…
jon-nfc Oct 21, 2024
519cdca
test(itam): Cluster API field checks
jon-nfc Oct 21, 2024
8dbf039
fix(itim): Ensure params passed to super when validating cluster
jon-nfc Oct 21, 2024
df656e7
test(itim): Cluster Serializer Validation checks
jon-nfc Oct 21, 2024
8d9e327
test(itim): Cluster API ViewSet permission checks
jon-nfc Oct 21, 2024
6b742f8
test(itam): Cluster Type API field checks
jon-nfc Oct 21, 2024
9424ef6
test(itim): Cluster Type Serializer Validation checks
jon-nfc Oct 21, 2024
b9e3a74
test(itim): Cluster Type API v2 ViewSet permission checks
jon-nfc Oct 21, 2024
a1f7a39
test(itim): Service API field checks
jon-nfc Oct 21, 2024
dc37c01
fix(itim): Ensure service config from template is not gathered if not…
jon-nfc Oct 21, 2024
978408a
test(itim): Service Serializer Validation checks
jon-nfc Oct 21, 2024
ddcadfa
feat(itim): Service Serializer Validations
jon-nfc Oct 21, 2024
bf603d0
test(itim): Service API v2 ViewSet permission checks
jon-nfc Oct 21, 2024
8bf8257
test(itim): Port API field checks
jon-nfc Oct 21, 2024
748e4b9
feat(itim): Port Serializer Validations
jon-nfc Oct 21, 2024
5cf4543
test(itim): Port API v2 ViewSet permission checks
jon-nfc Oct 21, 2024
8c614ad
feat(project_management): Add Project API v2 endpoint
jon-nfc Oct 22, 2024
0ee7d21
feat(project_management): Add Project Milestone API v2 endpoint
jon-nfc Oct 22, 2024
c338fef
feat(project_management): Add Project State API v2 endpoint
jon-nfc Oct 22, 2024
630622c
feat(project_management): Add Project Type API v2 endpoint
jon-nfc Oct 22, 2024
2f7856d
fix(project_management): for project serializer (api v1) ensure org i…
jon-nfc Oct 22, 2024
8b877b0
feat(project_management): Project Validation for API v2
jon-nfc Oct 22, 2024
bf856d1
feat(project_management): Add remaining Project base serializers for …
jon-nfc Oct 22, 2024
5de3bd3
test(project_management): Project API field checks
jon-nfc Oct 22, 2024
a7c26f0
fix(project_management): if user not hav org specified dont attempt t…
jon-nfc Oct 23, 2024
2cfc4d5
test(project_management): Project Serializer Validation checks
jon-nfc Oct 23, 2024
6b42cdf
test(project_management): Project API v2 ViewSet permission checks
jon-nfc Oct 23, 2024
0efac2c
test(project_management): Project Milestone API field checks
jon-nfc Oct 23, 2024
46c4bd9
test(project_management): add trace output to Project serializer
jon-nfc Oct 23, 2024
ae77562
test(project_management): Project milestone Serializer Validation checks
jon-nfc Oct 23, 2024
b36bb3a
test(project_management): Project Milestone API v2 ViewSet permission…
jon-nfc Oct 23, 2024
1e2fcb3
test(project_management): Project state API field checks
jon-nfc Oct 23, 2024
2d767f0
test(project_management): Project state Serializer Validation checks
jon-nfc Oct 23, 2024
fa3e553
test(project_management): Project State API v2 ViewSet permission checks
jon-nfc Oct 23, 2024
b6af09b
test(project_management): Project Type API field checks
jon-nfc Oct 23, 2024
7d9e58b
test(project_management): Project Type Serializer Validation checks
jon-nfc Oct 23, 2024
fbdfe78
test(project_management): Project Type API v2 ViewSet permission checks
jon-nfc Oct 23, 2024
a10ebe6
fix(project_management): Dont use init to adjust read_only_fields for…
jon-nfc Oct 23, 2024
bb4e87d
fix(project_management): use the post data or existing object for fet…
jon-nfc Oct 23, 2024
39a3e39
test(project_management): Project Serializer Validation clean up
jon-nfc Oct 23, 2024
8155056
test(project_management): Project API v2 ViewSet permission checks fo…
jon-nfc Oct 23, 2024
77cf6f6
fix(project_management): use the post data dict for fetching edit org…
jon-nfc Oct 23, 2024
45d8833
fix(project_management): For Project use a separate Import Serializer
jon-nfc Oct 23, 2024
e52dcec
chore(settings): remove extra fields declaration from external_links
jon-nfc Oct 23, 2024
4093630
fix(settings): Populate app_settings Meta
jon-nfc Oct 24, 2024
c3ed132
feat(settings): Add App Settings API v2 endpoint
jon-nfc Oct 24, 2024
6cf8682
fix(settings): Populate user_settings Meta
jon-nfc Oct 24, 2024
c314c17
feat(settings): Add User Settings API v2 endpoint
jon-nfc Oct 24, 2024
bab8fee
feat(api): Added ability to specify table fields within the viewset.
jon-nfc Oct 24, 2024
c65138c
feat(settings): Add Celery Task Logs API v2 endpoint
jon-nfc Oct 24, 2024
2db5408
feat(settings): Add get_organization function to app settings model
jon-nfc Oct 24, 2024
a71ea5d
test(settings): App Settings API field checks
jon-nfc Oct 24, 2024
6aaba5a
test(settings): App Settings API v2 ViewSet permission checks
jon-nfc Oct 24, 2024
3fdee96
test(settings): User Settings API field checks
jon-nfc Oct 24, 2024
460674f
test(settings): User Settings API v2 ViewSet permission checks
jon-nfc Oct 24, 2024
8ad01b2
test(settings): Celery Log API field checks
jon-nfc Oct 24, 2024
dc2d669
test(settings): Celery Log API v2 ViewSet permission checks
jon-nfc Oct 24, 2024
21d84ff
feat(api): Setup API to be correctly versioned
jon-nfc Oct 26, 2024
a679855
docs(api): Add filter and remove footer schemas from swagger ui
jon-nfc Oct 26, 2024
5ccdaae
feat(core): Add Base Ticket Serializer and ViewSet
jon-nfc Oct 26, 2024
ad3e073
feat(api): Custom exception UnknownTicketType
jon-nfc Oct 26, 2024
ad4b83c
feat(assistance): Add Request Ticket API v2 endpoint
jon-nfc Oct 26, 2024
7a7edff
fix(api): Correct inheritance order for ModelViewSet
jon-nfc Oct 26, 2024
ccd4acc
fix(api): Ensure read-only fields have choices added to metadata
jon-nfc Oct 26, 2024
03e9eae
feat(core): Add Ticket Category API v2 endpoint
jon-nfc Oct 26, 2024
a677965
fix(core): Correct ticket comment model name
jon-nfc Oct 26, 2024
688917d
fix(core): Add Ticket Category API v2 endpoint to urls
jon-nfc Oct 26, 2024
00edd24
feat(core): Add Ticket Comment API v2 endpoint
jon-nfc Oct 27, 2024
f2e0d3f
feat(config_management): Add url function to Config Groups model
jon-nfc Oct 27, 2024
5dd5fc2
feat(itam): Add url function to Device model
jon-nfc Oct 27, 2024
abf5b2d
feat(itam): Add url function to Operating System model
jon-nfc Oct 27, 2024
3f071cf
feat(itam): Add url function to Software model
jon-nfc Oct 27, 2024
1a86227
feat(itim): Add url function to Cluster model
jon-nfc Oct 27, 2024
e01945e
feat(itim): Add url function to Service model
jon-nfc Oct 27, 2024
f17e6e9
feat(core): Add url function to Ticket Linked Items model
jon-nfc Oct 27, 2024
c752ca8
feat(core): Add Ticket Linked Item API v2 endpoint
jon-nfc Oct 27, 2024
1ca07e7
fix: Dont attempt to access request within serializers when no contex…
jon-nfc Oct 27, 2024
2180448
feat(core): Add Related Ticket API v2 endpoint
jon-nfc Oct 27, 2024
f2a6457
feat(core): Add Item Ticket API v2 endpoint
jon-nfc Oct 27, 2024
88e95da
fix(core): Ensure item tickets class can have underscore in name
jon-nfc Oct 27, 2024
a621a82
fix(core): Ensure that when checking linked ticket class name, spaces…
jon-nfc Oct 27, 2024
0b21c39
fix(core): Add missing permissions function to ticket viewset
jon-nfc Oct 27, 2024
06ebcd9
test(core): Ticket Common API field checks
jon-nfc Oct 27, 2024
6c45996
test(assistance): Request Ticket API field checks
jon-nfc Oct 27, 2024
e9fd022
test(core): Ticket Category API field checks
jon-nfc Oct 28, 2024
aa04128
refactor(core): Ticket Comments to use a single API Endpoint
jon-nfc Oct 28, 2024
706efeb
test(core): Ticket Comment API field checks
jon-nfc Oct 28, 2024
8a8f158
test(core): Ticket Linked Items API field checks
jon-nfc Oct 28, 2024
4efb09b
test(core): Linked Ticket Common API field checks
jon-nfc Oct 28, 2024
ac783e3
test(core): Config Group Linked Tickets API field checks
jon-nfc Oct 28, 2024
9376420
test(itam): device Linked Tickets API field checks
jon-nfc Oct 28, 2024
f14ee2f
test(itam): Operating System Linked Tickets API field checks
jon-nfc Oct 28, 2024
33f80e2
test(itam): Software Linked Tickets API field checks
jon-nfc Oct 28, 2024
48027c3
test(itim): Cluster Linked Tickets API field checks
jon-nfc Oct 28, 2024
c2931bb
test(itim): Service Linked Tickets API field checks
jon-nfc Oct 28, 2024
28db3c1
test(core): Related Tickets API field checks
jon-nfc Oct 28, 2024
7d1241e
feat(core): Add Ticket Comment Category API v2 endpoint
jon-nfc Oct 28, 2024
4ff763c
test(core): Ticket Comment Category API field checks
jon-nfc Oct 28, 2024
ff86c3e
test(core): Ticket Common API v2 ViewSet permission checks
jon-nfc Oct 28, 2024
d633e16
test(assistance): Request Ticket API v2 ViewSet permission checks
jon-nfc Oct 28, 2024
efc7acb
test(core): Ticket Category API v2 ViewSet permission checks
jon-nfc Oct 28, 2024
045a150
test(core): Ticket Comment Category API v2 ViewSet permission checks
jon-nfc Oct 28, 2024
3154c42
test(core): Ticket Comment API v2 ViewSet permission checks
jon-nfc Oct 28, 2024
2027add
fix(core): Add missing ticket comment category url
jon-nfc Oct 28, 2024
72c98af
fix(config_management): Correct ticket url in group serializer
jon-nfc Oct 28, 2024
85d8d88
test(config_management): Group Ticket URL API field checks
jon-nfc Oct 28, 2024
76097a7
test(itam): Device Ticket URL API field checks
jon-nfc Oct 28, 2024
0e4fb94
test(itam): Operating System Ticket URL API field checks
jon-nfc Oct 28, 2024
a764608
test(itam): Software Ticket URL API field checks
jon-nfc Oct 28, 2024
ca6bc85
test(itim): Cluster Ticket URL API field checks
jon-nfc Oct 28, 2024
c4548ef
test(itim): Service Ticket URL API field checks
jon-nfc Oct 28, 2024
af15bf1
fix(core): Correct serializer item field to be for view serializer ONLY
jon-nfc Oct 28, 2024
43ba330
test(itim): Ticket Linked Item API field checks
jon-nfc Oct 28, 2024
dd8c6cb
test(core): Ticket Category API v2 Serializer checks
jon-nfc Oct 31, 2024
cf92289
feat(core): Ensure that ticket category cant assign self as parent
jon-nfc Oct 31, 2024
72b2e84
test(core): Ticket Comment Category API v2 Serializer checks
jon-nfc Oct 31, 2024
cfe1169
feat(core): Ensure that ticket comment category cant assign self as p…
jon-nfc Oct 31, 2024
961875e
feat(core): Ensure that ticket linked item validates if ticket supplied
jon-nfc Oct 31, 2024
7c51878
test(core): Ticket Linked Item API v2 Serializer checks
jon-nfc Oct 31, 2024
fd65f7a
feat(core): Ensure ticket comment Serializer is picked based off of c…
jon-nfc Oct 31, 2024
90eb5f1
feat(core): Ensure ticket comment Serializer validates for existance …
jon-nfc Oct 31, 2024
56dc246
feat(core): Add custom exception class
jon-nfc Oct 31, 2024
ffb5b04
feat(core): Determine serializer from action and user permissions for…
jon-nfc Oct 31, 2024
a21ca7c
test(core): Ticket Comment API v2 Serializer checks
jon-nfc Oct 31, 2024
b932322
test(core): Related Ticket API v2 ViewSet permission checks
jon-nfc Nov 1, 2024
374e159
fix(api): Ensure `METHOD_NOT_ALLOWED` exception is thrown
jon-nfc Nov 1, 2024
bfbb576
fix(core): Ensure related ticket slash command works for ticket comments
jon-nfc Nov 1, 2024
f8966dc
test(core): Related Ticket API v2 Serializer checks
jon-nfc Nov 1, 2024
1622032
feat(core): Add MethodNot Allowed to Centurion exceptions
jon-nfc Nov 1, 2024
49f7033
feat(core): Ensure Related Tickets validate against duplicate entries
jon-nfc Nov 1, 2024
7b0d329
refactor(core): Related ticket slash command to use serializer
jon-nfc Nov 1, 2024
4c351fe
fix(core): Only use Import Serializer on Ticket Comment Create if use…
jon-nfc Nov 1, 2024
2e2a0af
refactor(core): Ticket Linked Item slash command to use serializer
jon-nfc Nov 1, 2024
80e8d6e
fix(core): Ensure Ticket Linked Item slash command works for ticket c…
jon-nfc Nov 1, 2024
f1072d6
refactor(core): Ensure Ticket Linked Serializer works for Item Tickets
jon-nfc Nov 1, 2024
9333173
test(core): Item Linked Ticket API v2 ViewSet permission checks
jon-nfc Nov 1, 2024
915331e
test(core): Item Ticket API v2 Serializer checks
jon-nfc Nov 1, 2024
0469295
test(core): fix broken tests from 8b701785b3489db567f5ae08c58e28ae765…
jon-nfc Nov 1, 2024
d4a8a01
fix(core): Ensure triage and import permissions are catered for Tickets
jon-nfc Nov 1, 2024
0025804
refactor(core): Move ticket validation from is_valid -> validate method
jon-nfc Nov 1, 2024
2c72915
feat(api): Depreciate v1 API Endpoint Ticket Categories
jon-nfc Nov 1, 2024
6974dcc
feat(api): Depreciate v1 API Endpoint Ticket Comment Categories
jon-nfc Nov 1, 2024
dc3e756
feat(api): Depreciate v1 API Endpoint Ticket Comments
jon-nfc Nov 1, 2024
161f02c
feat(api): Depreciate v1 API Endpoint Assistance
jon-nfc Nov 1, 2024
adf8888
feat(api): Depreciate v1 API Endpoint Request Ticket
jon-nfc Nov 1, 2024
99cad1b
docs(views): update to denote dynamic permissions
jon-nfc Nov 1, 2024
05690bc
feat(api): Depreciate v1 API Endpoint Assistance
jon-nfc Nov 1, 2024
e96991d
docs(views): update to denote dynamic permissions
jon-nfc Nov 1, 2024
e23e838
feat(itim): Add Change Ticket API v2 endpoint
jon-nfc Nov 2, 2024
4de3d7e
feat(itim): Add Incident Ticket API v2 endpoint
jon-nfc Nov 2, 2024
2fe211a
feat(itim): Add Problem Ticket API v2 endpoint
jon-nfc Nov 2, 2024
06abf6a
feat(itim): Add Project Task API v2 endpoint
jon-nfc Nov 2, 2024
2a5eafd
fix(core): When obtaining ticket type use it's enum value
jon-nfc Nov 2, 2024
7c401e7
fix(core): Add Ticket Category URL to all Ticket Types
jon-nfc Nov 2, 2024
2240ff7
fix(core): Add project URL to all Ticket Types
jon-nfc Nov 2, 2024
5337648
feat(core): Ticket serializer to validate organization
jon-nfc Nov 2, 2024
d5497a4
feat(core): Ticket serializer to validate milestone
jon-nfc Nov 2, 2024
13a260c
feat(core): Ticket serializer to ensure user who opens ticket is subs…
jon-nfc Nov 2, 2024
46f10f2
feat(core): Add Parse error to exceptions
jon-nfc Nov 2, 2024
9f2dbe1
fix(core): Ticket serializer org validator to access correct data
jon-nfc Nov 2, 2024
c00af91
fix(core): Ensure that when fetching ticket permission, spaces are re…
jon-nfc Nov 2, 2024
bd0dbc1
fix(core): Ensure Organization can be set when creating a ticket
jon-nfc Nov 2, 2024
9eb4cf0
test(itim): Change Ticket API v2 ViewSet permission checks
jon-nfc Nov 2, 2024
0371ba3
test(itim): Incident Ticket API v2 ViewSet permission checks
jon-nfc Nov 2, 2024
2886633
test(itim): Problem Ticket API v2 ViewSet permission checks
jon-nfc Nov 2, 2024
5d43f9f
test(project_management): PRoject_task API v2 ViewSet permission checks
jon-nfc Nov 2, 2024
e1a6521
test(project_management): Ensure ticket assigned project for all API …
jon-nfc Nov 2, 2024
ecdc6c4
feat(core): Show project using base serializer for all ticket types
jon-nfc Nov 2, 2024
ff0dcf0
feat(core): Show milestone using base serializer for all ticket types
jon-nfc Nov 2, 2024
3805e20
test(assistance): Update request field checks to cater for project an…
jon-nfc Nov 2, 2024
2708f02
test(itim): Change Ticket API field checks
jon-nfc Nov 2, 2024
5593830
test(itim): Incident Ticket API field checks
jon-nfc Nov 2, 2024
dd76463
test(itim): Problem Ticket API field checks
jon-nfc Nov 2, 2024
e41a724
test(project_management): Project Task API field checks
jon-nfc Nov 2, 2024
44dfb1b
fix(core): Correct inheritence order for ticket serializers
jon-nfc Nov 3, 2024
4d6d009
fix(core): Correct Ticket read-only fields
jon-nfc Nov 3, 2024
980d21c
fix(core): Ensure that when creating a ticket an organization is spec…
jon-nfc Nov 3, 2024
e0cfc2e
fix(core): When creating a ticket, by default give it a status of new
jon-nfc Nov 3, 2024
959388c
fix(core): correct missing or incomplete ticket model fields
jon-nfc Nov 3, 2024
7668620
test(core): Common Ticket Test Cases for API v2 serializers
jon-nfc Nov 3, 2024
802ac05
test(core): Request Ticket API v2 Serializer Checks
jon-nfc Nov 3, 2024
0d17520
test(itim): Change Ticket API v2 Serializer Checks
jon-nfc Nov 3, 2024
cac55c7
test(itim): Problem Ticket API v2 Serializer Checks
jon-nfc Nov 3, 2024
e1a7209
test(itim): Incident Ticket API v2 Serializer Checks
jon-nfc Nov 3, 2024
43b0f85
test(project_management): Project Task API v2 Serializer Checks
jon-nfc Nov 3, 2024
9267d7d
test(core): Related Item Ticket Slash command checks.
jon-nfc Nov 5, 2024
3cf0e9e
fix(core): Related ticket slash command requires model to be imported
jon-nfc Nov 5, 2024
6616075
test(core): Blocks Slash command Checks.
jon-nfc Nov 5, 2024
36afed9
test(core): Blocked by Slash command Checks.
jon-nfc Nov 5, 2024
56f5b0c
test(core): Action command Related Item Ticket Slash command checks.
jon-nfc Nov 5, 2024
ca8d906
test(core): Ensure a non-existing item cant be Linked to a Ticket.
jon-nfc Nov 5, 2024
31f5148
feat(core): New signal for cleaning linked ticket items when the item…
jon-nfc Nov 5, 2024
dfd4d53
fix(core): When an item that may be linked to a ticket is deleted, re…
jon-nfc Nov 5, 2024
ce33040
test(core): Ensure that an item that may be linked to a ticket, when …
jon-nfc Nov 5, 2024
f232dbd
test(core): Relate Slash command Checks.
jon-nfc Nov 5, 2024
dc793d3
test(core): Spend Slash command Checks.
jon-nfc Nov 7, 2024
201faa7
fix(core): Correct duration slash command regex
jon-nfc Nov 7, 2024
6ffbf89
test(core): Ensure test setup correctly for ticket checks
jon-nfc Nov 7, 2024
6e3d4bc
fix(core): Ensure import user can set field `opened_by` when importin…
jon-nfc Nov 7, 2024
866a2b9
feat(api): Depreciate API V1 endpoint /api/config
jon-nfc Nov 7, 2024
1132ee6
test(project_management): Organization API v2 ViewSet permission checks
jon-nfc Nov 7, 2024
f28a783
test(access): Organization API v2 Serializer Checks
jon-nfc Nov 7, 2024
60a8585
fix(access): Dont capture exceptions within team serializer
jon-nfc Nov 7, 2024
619666a
fix(access): Team name required when creating, don't use default value.
jon-nfc Nov 7, 2024
28032ae
test(access): Team API v2 Serializer Checks
jon-nfc Nov 7, 2024
0df85a4
test(access): Team User API v2 Serializer Checks
jon-nfc Nov 7, 2024
8fb00df
fix(access): Team User team and user fields required when creating, d…
jon-nfc Nov 7, 2024
325fd3d
fix(access): Team User serializer not to capture exceptions
jon-nfc Nov 7, 2024
a5d5681
test(access): Organization API v2 Serializer Checks, only super user …
jon-nfc Nov 7, 2024
40d7552
test(functional): Move functional test cases to relevant functional t…
jon-nfc Nov 7, 2024
2718c93
test(functional): Move request ticket checks from unit
jon-nfc Nov 8, 2024
068d579
test(access): External Link API v2 Serializer Checks
jon-nfc Nov 8, 2024
b108489
test(settings): External Link API ViewSet permission checks
jon-nfc Nov 8, 2024
9a58297
test(core): Ensure that when ticket is assigned it's status is update…
jon-nfc Nov 8, 2024
a2c1b58
feat(itam): Add Inventory API v2 endpoint
jon-nfc Nov 8, 2024
a92291c
test(itam): Inventory API v2 Serializer Checks
jon-nfc Nov 8, 2024
b58adea
refactor(task): Adjust inventory to use API v2 serializer
jon-nfc Nov 8, 2024
c6c3438
fix(task): Ensure if inventory RX is a string, serialize it
jon-nfc Nov 8, 2024
ab9cdd6
chore(api): Correct DRF Swagger Docs errors
jon-nfc Nov 8, 2024
c36db21
chore(compose): updaate docker compose file for testing
jon-nfc Nov 8, 2024
d562e86
Merge pull request #383 from nofusscomputing/345-further-work
jon-nfc Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

- [ ] :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_
Expand Down
17 changes: 15 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "Debug: Django",
"name": "Centurion",
"type": "debugpy",
"request": "launch",
"args": [
Expand All @@ -17,6 +17,7 @@
"program": "${workspaceFolder}/app/manage.py"
},
{

"name": "Debug: Gunicorn",
"type": "debugpy",
"request": "launch",
Expand All @@ -35,9 +36,21 @@
"autoStartBrowser": false,
"cwd": "${workspaceFolder}/app"
},
{
"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",
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
"ITSM"
],
"cSpell.language": "en-AU",
"jest.enable": false,
}
29 changes: 27 additions & 2 deletions Release-Notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 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.

- 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"
Expand All @@ -14,10 +37,12 @@ This release updates the docker container to be a production setup for deploymen
- 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
## Version 1.0.0


Initial Release of Centurion ERP.

## Breaking changes

### Breaking changes

- Nil
34 changes: 34 additions & 0 deletions app/access/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,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)


Expand All @@ -28,6 +36,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()
Expand All @@ -45,6 +65,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 == '_':
Expand Down
17 changes: 17 additions & 0 deletions app/access/migrations/0002_alter_team_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 5.1.2 on 2024-10-13 06:42

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('access', '0001_initial'),
]

operations = [
migrations.AlterModelOptions(
name='team',
options={'ordering': ['team_name'], 'verbose_name': 'Team', 'verbose_name_plural': 'Teams'},
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Generated by Django 5.1.2 on 2024-10-13 15:27

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', '0002_alter_team_options'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
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', null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
),
migrations.AlterField(
model_name='team',
name='team_name',
field=models.CharField(default='', help_text='Name to give this team', max_length=50, verbose_name='Name'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Generated by Django 5.1.2 on 2024-10-16 06:54

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('access', '0003_alter_organization_id_alter_organization_manager_and_more'),
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='teamusers',
options={'ordering': ['user'], 'verbose_name': 'Team User', 'verbose_name_plural': 'Team Users'},
),
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'),
),
]
18 changes: 18 additions & 0 deletions app/access/migrations/0005_alter_team_team_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.2 on 2024-11-07 06:28

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('access', '0004_alter_organization_options_alter_teamusers_options_and_more'),
]

operations = [
migrations.AlterField(
model_name='team',
name='team_name',
field=models.CharField(help_text='Name to give this team', max_length=50, verbose_name='Name'),
),
]
19 changes: 16 additions & 3 deletions app/access/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

if hasattr(self, '_object_organization'):

return self._object_organization
return int(self._object_organization)

try:

Expand Down Expand Up @@ -124,9 +124,13 @@

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

Expand All @@ -136,6 +140,10 @@
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 "
Expand Down Expand Up @@ -216,6 +224,11 @@

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)
Expand Down Expand Up @@ -418,6 +431,6 @@

if not self.permission_check(request):

raise PermissionDenied('You are not part of this organization')

Check failure on line 434 in app/access/mixin.py

View workflow job for this annotation

GitHub Actions / Python / Unit Test (3.10)

You are not part of this organization

Check failure on line 434 in app/access/mixin.py

View workflow job for this annotation

GitHub Actions / Python / Unit Test (3.10)

You are not part of this organization

Check failure on line 434 in app/access/mixin.py

View workflow job for this annotation

GitHub Actions / Python / Unit Test (3.11)

You are not part of this organization

Check failure on line 434 in app/access/mixin.py

View workflow job for this annotation

GitHub Actions / Python / Unit Test (3.11)

You are not part of this organization

Check failure on line 434 in app/access/mixin.py

View workflow job for this annotation

GitHub Actions / Python / Unit Test (3.12)

You are not part of this organization

Check failure on line 434 in app/access/mixin.py

View workflow job for this annotation

GitHub Actions / Python / Unit Test (3.12)

You are not part of this organization

Check failure on line 434 in app/access/mixin.py

View workflow job for this annotation

GitHub Actions / Python / Unit Test (3.13)

You are not part of this organization

Check failure on line 434 in app/access/mixin.py

View workflow job for this annotation

GitHub Actions / Python / Unit Test (3.13)

You are not part of this organization

return super().dispatch(self.request, *args, **kwargs)
Loading
Loading