-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: Bug archived read only mode variants are editable even tho not persisted #257
fix: Bug archived read only mode variants are editable even tho not persisted #257
Conversation
I will take a close look to this PR. Have you seen this related issue ? #191 |
Thank you for your comment. I believe integrating the standalone application will be quite simple. If environment.backendDisabled is set to true, the getVariantIsWritable method in VersionControlService should always return true. Additionally, the environment object could be extended with a flag - readonly: boolean. If readonly is set to true, everything can be handled in VersionControlService to enforce the read-only mode. Possibly, this method should be moved to another service, which requires a software architectural review that has not yet been done in detail. However, this can be easily achieved through refactoring. Important method: VersionControlService.getVariantIsWritable() |
…netzgrafik-editor-frontend into 190-bug-archived-read-only-mode-variants-are-editable-even-tho-not-persisted
I have overworked the styling and the behavior (only styling) when:
|
Shouldn't archived projects automatically archive variants that aren't archived yet ? Here, the variant isn't archived, even tho the project is, but the if we open the variant, the mode is archived The solution would be to automatically archive all the variants of a project that is archived, and tick and disable by default the Show archive button ? |
src/app/perlenkette/perlenkette-node/perlenkette-node.component.html
Outdated
Show resolved
Hide resolved
I'm not sure if I understood everything correctly. So I would like to briefly explain what the archive concept looks like: If a project is archived, then all attached (assigned) variants are read-only. (Here I have just identified a problem, i.e., if a project is archived, there is an auth error if one tries to archive a non-archived variant -> read-only protection applies). However, the variants are not shown as archived. If a project is not archived, variants can be archived, as the project is not read-only. However, this requires that the user has write permissions. Archiving means deleted – in other words, only archived variants can be deleted. The same applies to projects. It’s a two-step process, so that on one hand, the user can be really sure that they want to delete something. Or one can define in the process that all work should remain saved, then everything that is no longer needed is archived and that’s it. |
…. => write control doesn't allow changes
The above reported error fixed is fixed : 4b6c5e5 |
@@ -171,7 +171,8 @@ describe("TrainrunSection-View", () => { | |||
copyService, | |||
logService, | |||
viewportCullSerivce, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? (2*7 occurrences of this in the folder editor-main-view)
or is the modification into viewportCullService not the subject of this PR/issue ?
Thanks for your explanations in your previous comment, I better understand the logic : the variants inside an archived project should not be able to be (un)archived afterwards. The user can then see the archived and unarchived variants of an archived project -> working well |
…netzgrafik-editor-frontend into 190-bug-archived-read-only-mode-variants-are-editable-even-tho-not-persisted
Description
When the project is archived, the user can no longer modify the netzgrafik. All editing functions should be disabled.
Testing
This bug fix is a big one. Therefore, we have to deeply test the user interface interactions. There should be no differences from the current version as long as the project is not archived. If a project along with their variants are archived, the display of these variants is read-only. That means the user can no longer make any changes.
Checklist
documentation/