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

Global read-only and read-only workflows #5406

Merged
merged 16 commits into from
May 27, 2024

Conversation

MariusVuscanNx
Copy link
Contributor

@MariusVuscanNx MariusVuscanNx commented May 17, 2024

Implemented two levels of read-only:

  • Global read-only that can be set at the engine level by

    .UseWorkflowManagement(management =>
    {
        management.UseReadOnlyMode(true);
    })
    

    If enabled, publish, unpublish, delete, create, update references, bulk actions (except export), import, import files are not allowed

  • Adjusted the existing read-only workflows functionality
    If attribute enabled, then publish, retract, delete, import and update references are not allowed.

For both levels, links were exposed to be handled in the designer by leveraging the HATEOAS method.


This change is Reviewable

@raymonddenhaan
Copy link
Contributor

Also please have a look at the Sonar analysis of the PR:
https://sonarcloud.io/project/issues?resolved=false&sinceLeakPeriod=true&branch=feature%2Freadonly&id=elsa-workflows_elsa-core

MariusVuscanNx and others added 9 commits May 23, 2024 15:29
…adonly

Readonly updates to the readonly branch
An unused Protobuf library import was found in Program.cs file. In order to clean up the code and improve readability, this import statement has been removed. No other changes have been made.
Optimize code by removing unnecessary constructor assignments and simplify function calls. The simplification is mainly achieved by directly passing the required services as constructor parameters instead of assigning them to private fields first. This results in a more readable and less redundant code.
Copy link
Member

@sfmskywalker sfmskywalker left a comment

Choose a reason for hiding this comment

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

Nice work @MariusVuscanNx !

@sfmskywalker sfmskywalker merged commit d817d7c into elsa-workflows:main May 27, 2024
2 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.

None yet

3 participants