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: How do I set access right of "Inherit from parent" for attribute in DXL script?
Topic Summary: How do I set access right of "Inherit from parent" for attribute in DXL script?
Created On: 7-Jul-2006 15:40
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.
 7-Jul-2006 15:40
User is offline View Users Profile Print this message


John Morey

Posts: 1
Joined: 12-Jan-2004

I'm trying to write a DXL script that sets the access rights of all attributes to "Inherit from parent". I don't see how to do this. For the actual requirements "inherited(o)" can be used but this does not work for attributes. Here is what I have so far:
AttrDef ad
AccessRec ar
string sAttrName
for ad in (current Module) do
{
sAttrName = ad.name
print sAttrName
print "\n"
for ar in ad do
{ // test whether object has specific access rights
print "found ar for "
print sAttrName
print "\n"
}
}
This simply printouts a line for each accessrec found per attribute. The atrributes that have inherit from parent set do not have any accessrecs found.

Thanks for any help,

John Morey
Report this to a Moderator Report this to a Moderator
 7-Jul-2006 20:28
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

DXL manual chapter 'Access controls' section 'Controlling access'. Look for "inheritedDef" or "inheritedVal". The first sets protection of the definition of the attribute (whether folks can modify the definition of the attribute (such as its name or whether it has a default value). The second sets the protections of the value (whether someone cal modify an objects value of that attribute).

In your case, use this:
for ad in mod do
{ ErrMess = inheritiedVal(mod, ad)
if (!null ErrMess) infoBox((ad.name) " Value inherited error: " ErrMess)
ErrMess = inheritiedDef(mod, ad)
if (!null ErrMess) infoBox((ad.name) " Definition error: " ErrMess)
}
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.