Author Topic: "Super-user" updating locked elements  (Read 1533 times)

adepreter

  • EA User
  • **
  • Posts: 97
  • Karma: +2/-2
    • View Profile
"Super-user" updating locked elements
« on: January 09, 2017, 03:54:28 am »
Is there any way to update elements programmatically even when they are locked?
This is needed when a language gets migrated (Stereotype, tag name changes...).

As an alternative, how could we
- Save the locks to a file
- Release all locks
- Reload the locks from the file


qwerty

  • EA Guru
  • *****
  • Posts: 9598
  • Karma: +168/-148
  • I'm no guru at all
    • View Profile
Re: "Super-user" updating locked elements
« Reply #1 on: January 09, 2017, 05:43:40 am »
An operator can force unlock elements, so they are free to be changed. But AFAIK there is no restore that puts back the lock. Might be worth an investigation...

q.

P.S. You could write a script to save all t_object.style values which contain "Locked", do the unlock/change and then restore the style.
« Last Edit: January 09, 2017, 05:59:14 am by qwerty »

adepreter

  • EA User
  • **
  • Posts: 97
  • Karma: +2/-2
    • View Profile
Re: "Super-user" updating locked elements
« Reply #2 on: January 10, 2017, 05:44:49 am »
Thank you. That sounds like a good idea. We will give it a try.

qwerty

  • EA Guru
  • *****
  • Posts: 9598
  • Karma: +168/-148
  • I'm no guru at all
    • View Profile
Re: "Super-user" updating locked elements
« Reply #3 on: January 10, 2017, 10:08:54 am »
You should be careful with those scripts. Make a backup and lock out normal users while running the script. Or take/swap the lock exclusively for the super-user.

q.