Archi Forum

Archi => General Archi Discussion => Topic started by: Manj75 on May 23, 2019, 15:57:15 PM

Title: Ability to set folders/views to be non-editable
Post by: Manj75 on May 23, 2019, 15:57:15 PM
Is there any way or any plug-in to select at the folder or viewpoint to be non-editable such that if set then Archi would not allow elements from the palette to be added to the view or recursively to all sub-folders and views if set at folder level.  I suspect this is not a feature, but believe this would be very beneficial to protect certain views.

If not available can this be added to the roadmap?

I have been rolling out Archi 4.4 and collaboration plugin with TFS GIT for the Ecommerce Architecture team and is gaining a lot of interest to be rolled out to other business verticals.  I'm proposing that instead of a single organisation model each vertical will have their own model-git, enabling some independence and keeping the models manageable.

I want to be able to include shared views in multiple models, which can initially be added manually per model - but I want these views to be protected and not edited.  I will submit another post to detail my plans as I have another question directly regarding this approach.
Title: Re: Ability to set folders/views to be non-editable
Post by: Hervé on May 23, 2019, 16:09:16 PM
Hi,

In the my database plugin (https://github.com/archi-contribs/database-plugin (https://github.com/archi-contribs/database-plugin)) roadmap, I'm planning to introduce access rights on the models components (i.e. who can create, update, delete components, based on individual rights or role rights).

The key issue is that it is very easy to deactivate a plugin (just delete or rename a jar file). So if this is not done in the core of Archi, it will always be possible to bypass the security rules defined in any plugin. That's the reason why I did not implement it so far, and that, per my knowledge, there is no plugin that does what you wish.

Best regards
Hervé

Title: Re: Ability to set folders/views to be non-editable
Post by: Phil Beauvoir on May 23, 2019, 16:18:48 PM
Please add a feature request on the Archi GitHub issue tracker:

https://github.com/archimatetool/archi/issues

This ensures that the issue can be tracked properly.

As Hervé said, this would need to be done in the core Archi code so not possible in a plug-in.
Title: Re: Ability to set folders/views to be non-editable
Post by: Alberto on May 23, 2019, 18:07:10 PM
Quick tip: Basic access controls could be managed at the repo level if you use one. At least that's how we do it :P

Curious how access controls this could be implemented for an open exchange file
Title: Re: Ability to set folders/views to be non-editable
Post by: Manj75 on May 24, 2019, 07:36:41 AM
Thanks to all your responses - as Phil mentioned I agree that it needs to be part of the core Archi to enforce permissions and I'll add to the feature tracker.  I'm not interested in a full User Access Control system, just a simple enable/disable editing on viewpoint/folder level under the Views folder to prevent accidental changes.  I understand that the setting can be disabled for editing by anyone but this will be a deliberate action.
Title: Re: Ability to set folders/views to be non-editable
Post by: Alberto on June 07, 2019, 14:25:29 PM
Welp! this has finally dawned on me  :o... yes, the need to have the ability to lock up a View from editing, meaning moving elements around the view, would be a great feature to have in Archi.

I'm guessing this can be achieved by setting up a special property in the view that Archi can act on?  It would be harder to implement if we are looking to prevent elements from changing names or descriptions, or relationships to change source/dest because they exist in a particular 'locked' view.

@Manj75  did you end up submitting this to GitHub?
Title: Re: Ability to set folders/views to be non-editable
Post by: Manj75 on July 23, 2019, 09:55:32 AM
Hi Alberto - I have created feature request #505 on GitHub.
Title: Re: Ability to set folders/views to be non-editable
Post by: Phil Beauvoir on July 23, 2019, 10:02:05 AM
Just to manage expectations - such a feature would not be trivial to implement. Off the top of my head it would affect, and the code would need to be changed, the following:

- Storing non-editable flag in model
- UI for managing non-editable flag
- Handling for sub-folders and related elements/relations
- Models tree management - creation, deleting, duplicating, copying, pasting, rename
- Undo/Redo stack
- Drag and drop from models tree to diagram
- DiagramEditor palette, DND, editing, renaming, Undo/Redo
- Diagram Editor DND, creation, copy, paste, rename
- Impact on all other diagrams that reference "locked" concepts
- Impact with Collaboration plug-in
- Check impact and integration with jArchi
- Check impact with exchange format

I'm sure there would be other things impacted.
Title: Re: Ability to set folders/views to be non-editable
Post by: Manj75 on July 25, 2019, 12:15:52 PM
Hi Phil,

Thanks for the update.

I noticed that the feature is already implemented and working for Canvas as it shows a Locked tickbox when selecting an element on the canvas.  This is the kind of feature I need but at a whole view level such that if the view::Locked is ticked all elements on that view are frozen, i.e. layout cannot be changed and design elements cannot be resized or text changed.  There is an acceptance that the design elements can be changed from other views or from the model direct which will apply to the locked view too, but critically no changes can be made through the locked view.

Does this make it any easier of a feature to implement.

Objective is to prevent accidental layout/resizing commits on views when the model is used by teams.

Best Regards,
Manjit
Title: Re: Ability to set folders/views to be non-editable
Post by: Phil Beauvoir on July 25, 2019, 12:18:44 PM
> Does this make it any easier of a feature to implement.

Unfortunately, no. The issues I listed above would still need to be addressed.
Title: Re: Ability to set folders/views to be non-editable
Post by: Manj75 on July 25, 2019, 14:55:06 PM
ok - that's fine thanks  :)