Skip to content

Conversation

Retoocs
Copy link
Contributor

@Retoocs Retoocs commented May 29, 2025

Description

Long story short:

  1. Reworked user domain: introduced Identity and Actor as Cases, where actor can be either User or Group.
  2. Implemented service layer for the new domain.
  3. Introduced abstractions for system cases (domain wrappers, factories, service layer, ...)
  4. Updated authentication to work with new domain (as temporary solution)
  5. Updated authorization to work with new domain (kept the same evaluation formulas, with little change - application admin can do anything)
  6. Implemented RBAC approach (decoupled roles, role assignments and permissions)
  7. Roles are not tied with a process anymore

The documentation for the changes is not added. It will be added in another task. Some of the unit tests still fail (around 27 failures and 45 errors out of 467 tests). This tests are going to be resolved in another tasks.

Implements NAE-2058

Dependencies

No new dependencies were introduced

Third party dependencies

No new dependencies were introduced

Blocking Pull requests

Depends on #266

How Has Been This Tested?

For the changes where implemented new unit tests. Many unit tests were updated to work with changes. Some scenarios where tested manually (f.e. database transaction failures - correct rollback, ...)

Test Configuration

Name Tested on
OS Ubuntu 24.04.1 LTS
Runtime Java 11
Dependency Manager Maven 3.6.3
Framework version Spring Boot 2.7.8
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @mazarijuraj
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

camperko and others added 30 commits June 3, 2024 11:15
- fix file upload
- fix enumeration set data deleted choices
- WIP add ValidationRunner & ValidationDelegate
- implement ValidationRegistry with ValidationService
- run validatioins on setDataField and finishTask
- add validation process
- implement ValidationRunner on startup
- rename validation runner to validation executioner due to compilation errors
- update executioner and service and its method calls
- implement an example test scenario
- remove original validations package, comment out original validations tests
- reimplement original validations into validation delegate
-  resolve possible duplicities (field - validation name, register existing validation name)
- review tests - except date/datetime between, text regex
- update Importer.createPetriNet
- remove unnecessary attributes in Importer
- add util methods in Version
- extend LinkedHashMap by UniqueKeyMap
- use UniqueKeyMap in PetriNet
- implement PetriNet.parentIdentifiers
- add compound index in PetriNet
- make PetriNet.identifier indexed
- implemented tests in ImporterTest
- fix PetriNetServiceTest
- add Case.parentPetriNetIdentifiers
- update WorkflowServiceTest
- mark PetriNetIdentifier.identifier as indexed
- fix typo in PetriNetController
- update validations regarding new petriflow schema
- generate ids for ProcessRoles on child net
- update PetriNetService.deletePetriNet to delete child nets too
- implement PetriNetServiceTest.deleteParentPetriNet
- fix attribute initialization in PetriNet
- fix query dsl generation
- fix ImporterTest
- fix test nets
- fix DataSearchRequestTest
- rework closures to methods in ValidationDelegate
- update validations execution
- update FieldFactory and add new classes for validations
- update validation tests
- update schema and related data structure
- refactor model classes
- update validation delegate and executioner
- add more tests for dynamic validations
- update other tests for new validations
- update transition validation in ValidationService
- refactor executioner
- update ValidationRunner: mongo search
- update validation process
- update tests
- remove unnecessary tests
- refactor ValidationExecutioner
- fix ValidationRunner predicate
- add null check to ValidationService
- update validation process - fields behavior, validation type field
- add more validation tests
- comment outdated code for future work
- update model classes
- update field default value definition
- update system processes
- update importer
- add configuration for action and function evaluation
- refactor arc factory to arc importer
- refactor process validation
Retoocs added 21 commits May 12, 2025 10:45
- remove system identity, keep only user
- update API to use only system user where it's needed
- only app roles are assigned to super creator
- update tests
- fix ApplicationRoleRunner according to tests
- Removed `@JsonIgnore` from `processRolePermissions` in `Case.java`.
- Renamed `userId` to `assigneeId` in `TaskPair` for consistency.
- Fixed incorrect method call `setUserId` to `setAssigneeId` in `Case.java`.
- add some javadoc
- move attributes and method from ProcessRole to Role
- implement RoleService.findAllRoleIdsByActorAndGroups
- update RBACController response type and error handling
- fix Identity.getAllActors
- make AccessPermissions a wrapper class
- implement CaseAuthorizationService.canView
- implement RBACController.findApplicationRole
- update NetgrifBasicAuthenticationProvider
- update TaskSearchService
- fix querydsl map type generation
- update TaskSearchService
- fix task search
- fix UniqueKeyMapWrapper
- fix AccessPermissions
- update initialization of ElasticPetriNet.initials
- add check for uriNodeId in PetriNetService.importPetriNet
- update attributes of PetriNetReference
- optimize CrudSystemCaseService.findAllByQuery
- implement property setting for SystemCase
- introduce anonymous property flag
- implement: throw an exception on creation if the case already exists
- update tests
- fix edge case in AuthorizationService
- fix CaseAuthorizationService, TaskAuthorizationService according to tests
- update tests
- implement data correction after group removal
- merge from NAE-1998 few core classes
- merge from NAE-1998 more classes
- fix compilation
- remove some validation on process import
- remove some validation in DataService
- implement check in DataService.getLayouts
- update TaskSearchRequest with state
- fix tests
- fix tests
- fix implementation according to tests
- implement mongo transactions in CrudSystemCaseService
- implement mongo transactions in RegistrationService
- update documentation in NaeTransaction
@Retoocs Retoocs self-assigned this May 29, 2025
@Retoocs Retoocs added improvement A change that improves on an existing feature Extra Large labels May 29, 2025
Copy link

coderabbitai bot commented May 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extra Large improvement A change that improves on an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants