Book a Demo

Author Topic: How to detect if an element could be deleted without locks?  (Read 6017 times)

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
How to detect if an element could be deleted without locks?
« on: September 26, 2018, 07:57:32 am »
I would like to validate if the current user is enabled (by evaluating if belongs to a security group) to delete an element. It would be great if the workflow scripts had the function CanDeleteElement, but not.

I don't want to lock the elements to the given group because if you don't belong to the group, you can not edit or create connectors to this element. But I need to allow all users to edit or create connectors to the elements, but only allows some users to delete the elements. Any idea?

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: How to detect if an element could be deleted without locks?
« Reply #1 on: September 26, 2018, 06:27:30 pm »
Hi,

I thought you could create a connector to an element locked to you via UI and Automation Interface - have you tested ?

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: How to detect if an element could be deleted without locks?
« Reply #2 on: September 26, 2018, 11:14:47 pm »
Hi,

I thought you could create a connector to an element locked to you via UI and Automation Interface - have you tested ?

It is supposed the Automation Interface runs with the permissions of the user running the automation. But you can create the connector via INSERT into the t_connector table, but it changes the natural way of creating connector (via the toolbox or the quicklinker). The idea is not to change the normal behavior of the user interface, just restricting the element deletion.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to detect if an element could be deleted without locks?
« Reply #3 on: September 27, 2018, 04:25:35 am »
Why is it that you want to prevent it? Rogue modelers? Why not fire them if they don't behave well?

q.

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: How to detect if an element could be deleted without locks?
« Reply #4 on: September 27, 2018, 06:37:32 am »
Why is it that you want to prevent it? Rogue modelers? Why not fire them if they don't behave well?

q.
They are many modelers! I can't fire them all! Just want to prevent accidental deletions

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to detect if an element could be deleted without locks?
« Reply #5 on: September 27, 2018, 08:43:31 am »
Enable security. That's just what it was designed for. If on takes two steps (lock, delete) it's intentional.

q.

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: How to detect if an element could be deleted without locks?
« Reply #6 on: September 27, 2018, 08:47:22 am »
Enable security. That's just what it was designed for. If on takes two steps (lock, delete) it's intentional.

q.

The idea is to allow connecting elements but not to delete them. It could be better designed if Delete elements was a permission different from Update elements.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to detect if an element could be deleted without locks?
« Reply #7 on: September 27, 2018, 11:15:31 am »
Enable security. That's just what it was designed for. If on takes two steps (lock, delete) it's intentional.

q.

The idea is to allow connecting elements but not to delete them. It could be better designed if Delete elements was a permission different from Update elements.
+1!

As Arquesoft said, in an Enterprise situation, there may be too many modellers!

Hell, even I've accidentally deleted the wrong arc.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!