Book a Demo

Author Topic: How to prevent regular users from adding new root nodes to a shared repository?  (Read 3950 times)

christofn

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
I use a shared repository (MS SQL) and have enabled security. I use group locks on the root node, views and packages to restrict edit access to specific users. This all works fine. I have one remaining issue with users still being able to add new root nodes to the shared repository which I don't want. Only the built-in admin account is member of the security group with specific rights on the root node. All other users can only access is which seem to work as the options under package control are all grayed out for regular users. How can I disable the option 'add root node' in the context menu for regular users?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
I don't think you can tune that (though not 100% sure). Unless a Sparxian comes up with some option the only ways that comes to mind are a) an add-in to react on element creation and b) a database trigger (which is kind of rude).

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
I don't think there is an option to restrict that either.

But you could simply ask your users not to create additional root nodes. In my experience that is often enough for 99% of the people.
And for the other 1%, I guess it won't be that frequent that you can't handle it on a case by case basis.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
What Geert (back from holidays!) said. I just forgot that simple solution as that is what I usually do in the beginning of a project: make it part of the design rules and include it in the training.

q.

christofn

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
OK, thanks for the feedback. I hoped for a different answer but it is what it is.

Takeshi K

  • EA User
  • **
  • Posts: 632
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Hello christofn,

A different answer: create a Model Add-In to receive EA_OnPreNewPackage() event. When ParentID is 0, this means a root node. So, you return False for the EA_OnPreNewPackage event in the Add-in to prevent creating a root node. (not tested, but confirmed the event occurs)

Model Add-Ins
https://sparxsystems.com/enterprise_architect_user_guide/16.0/add-ins___scripting/modeladdins.html

If I remember correctly, you can specify security groups to enable Model Add-ins. This means that some users can create root nodes even if the Add-in exists in the model.

Hope this helps.

--
t-kouno