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

Compliance Auth Group Fixes and Changes #246

Merged
merged 27 commits into from
Mar 26, 2024

Conversation

awf-dbca
Copy link
Contributor

@awf-dbca awf-dbca commented Mar 25, 2024

Number of fixes and adjustments to Compliance Management, mainly pertaining to allocated access groups.

Changes included*:

  • Re-enabling the allocated_group column for the SanctionOutcome model
  • Reviewing each stage of a number of object workflows and ensuring that all objects have an allocated_group value while they are open
  • Removing the organisation request link from the Compliance Management nav links
  • Ensuring that only users assigned to a given object can make changes to said object (except inspections, where a member of an inspection team can also make changes at the inspection's initial stage)
  • Fixing the assignment drop-down display and functionality so that users can assign themselves or others to a given object
  • Adding a dedicated inspection officer group, works the same as the officer group but specific to inspections (officers cannot change inspection details unless they are part of the inspection's inspection team)
  • Adding environment variables to control access among groups - by default all groups sharing the same group name (e.g. officer) will have their objects editable by users belonging to all of those groups regardless of region/district
  • A region lock env var is available so that only users in groups belonging to specified region/district can make changes to objects belonging to a given group
  • A super group env var is available for when the region lock is enabled but some groups (with no specified region/district) need to be able to alter objects belonging to groups with same name (in the case of where regions are specified, those groups can alter objects with that region regardless of district)
  • Fixed inspection team search/add/remove
  • Added server-side authentication to the related item functions
  • Added server-side validation for all workflow processes pertaining to Inspections, Offences, Sanction Outcomes, and Legal Cases

*Where referring to objects, referring to Inspections, Offences, Sanction Outcomes, and Legal Cases

The changes should allow for users to choose how group users are allowed to interact with objects with regards to their specified regions and districts. A number of issues that could lead to stale objects have also been fixed, as well as some minor security issues.

Note: regardless of auth options, officer and manager region and district groups must be specified to create and forward objects. For example, to create a legal case in the kimberley region, an officer kimberley region group must exist (it can be empty if region locks are disabled, however)

…d_group to be reviewed (currently disabled and/or tied to offence allocated_group) and some allocated_group assignment functions may need review in terms of which assignment types are handled by which user group
…mail sent to parent offence allocated_group (temporary, pending review)
…eview still needed) and get_members (for CMS group model) function bug fixed (and function applied in place of deprecated members attr)
…ides assign to me when user is already assigned, displays the currently displayed user, and updates on change (implemented for only inspection currently)
…o objects (exception for open inspections, which inspection teams members can alter regardless)
…for other objects (WIP), added minimum auth to main views endpoints and internal auth check to create/delete weak link functions (anyone could do that until now)
…ROUP_REGION_DISTRICT_LOCK_ENABLED - former allows non-region/district specific group member to access all contituent group members, latter allows all group members to access group members with the same name
…er can be added/removed from any given inspection team
… for region/district upon inspection creation (same as all other objects with officer groups)
…nd obstructing add related items for objects object (artifacts)
…t on creation of offences, sanctions, and cases (while region lock if off)
Copy link
Collaborator

@xzzy xzzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sensitivity Check Completed

@xzzy xzzy merged commit 36c41a7 into dbca-wa:master Mar 26, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants