Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Lock an individual object
Topic Summary:
Created On: 6-Apr-2006 19:10
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 6-Apr-2006 19:10
User is offline View Users Profile Print this message


Robin Riley

Posts: 4
Joined: 15-Aug-2003

Once a set of objects have been inspected (but before the module is baselined), we'd like to be able to "lock" those objects so no one can modify them. I added a bool attribute (Locked) to the objects in the module. The idea is that once an object has been inspected, the attribute value would be set to Locked. I then added a pre/open trigger on the objects that returns a trigPreConFail if the "Locked" attribute was set to true. I thought that returning a fail condition would prevent the event from taking place. However, the object is still modifiable. Does anyone know how I can go about accomplishing this?

Thanks,
Robin

-------------------------
--------------------------------------
Robin Riley
Motorola, Inc
Robin.Riley@motorola.com
Report this to a Moderator Report this to a Moderator
 6-Apr-2006 20:23
User is offline View Users Profile Print this message


cliff Bly

Posts: 58
Joined: 11-Apr-2003

Why not just change the access privileges so that only a adminstrative group can edit the object(s).

Set EveryoneElse to READ.

-------------------------
Cliff Bly
Report this to a Moderator Report this to a Moderator
 7-Apr-2006 04:57
User is offline View Users Profile Print this message


Kevin James

Posts: 32
Joined: 12-Dec-2005

Robin,

I haven't used the pre/open event for objects before, but we've implemented something similar to what you're trying using a trigger that fires on the pre-attribute-save event.  We're only preventing users from changing a single attribute and not the whole object, but you may be able to achieve something similar by having the trigger fire for all attributes in the module.

Kevin
Report this to a Moderator Report this to a Moderator
 7-Apr-2006 12:38
User is offline View Users Profile Print this message


Roy Bond

Posts: 39
Joined: 25-Mar-2003

We use BOTH the pre-open Object and pre-save Attribute triggers to set a trigPreConFail, and this completely locks the user out of the Object.

NB Remember to have a back door, eg. a Module Object to enable/disable the triggers.

Roy Bond
MTU Aero Engines
Munich
Report this to a Moderator Report this to a Moderator
 10-Apr-2006 18:32
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

The pre-attr-save trigger has worked well for us, once defined for all attributes in the module. This stopped modifications via clicking in a displayed column.

I believe you could still modify the object via DXL, and IIRC could still use the object editor to do it as well.

A desperate method may be to write a pre-save-module trigger that prevented saving if any locked object has been modified. I'd be tempted to prompt the user to backout any such changes (via history), but that would get real sticky.

- Louie
Report this to a Moderator Report this to a Moderator
 16-May-2006 16:11
User is offline View Users Profile Print this message


Jordan Jump

Posts: 5
Joined: 18-Nov-2005

I think Cliff (2nd post) has the right idea. Those who work in shared mode and setup their own sections are acutely aware of this concept. Attributes and objects have their own permissions. By default all of these are set to inherit from parent. In the module properties (Access tab), if you uncheck the "Inherit from Parent" you can set the permissions for that object (and the objects under its hierarchy). When you edit the permissions, make sure that _somebody_ has the permissions to change the permissions back, because it is possible to lock _everyone_ out of that object.

When compared to the attribute method it is probably more robust, but has a few disadvantages:
1) Requires exclusive edit mode to change
2) Moderately more difficult to code in DXL (depending how permissions are set up).
3) Affects the entire object (including attributes)

Jordan

Edited: 16-May-2006 at 16:11 by Jordan Jump
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.