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: Set delete permission
Topic Summary:
Created On: 10-May-2004 15:06
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.
 10-May-2004 15:06
User is offline View Users Profile Print this message


Pieter DE WAARD

Posts: 73
Joined: 11-Jul-2003

Does anyone know why the DXL function set does not work for delete in the attached snippet? AccessList is an array containing all possible Permissions, including delete. For all cases it works, except for the case "delete". The value returned by the set call is null, also for "delete". We thought our script worked under 5.2, although not well tested. Now this under 7. Maybe this is a known "feature"?

-------------------------
Pieter de Waard
www.nhindustries.com

Edited: 10-May-2004 at 15:08 by Pieter DE WAARD
Report this to a Moderator Report this to a Moderator
 10-May-2004 19:20
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Cannot follow the code: you have objects that contain the desired access to view?

I doubt this will help, but here goes: All I can think of is this: If you set a specific permission its prerequisite permissions, I suppose, would need to already be set. "D" cannot exist without "R" and "M".

[1] Do your desires reflect that, or are you asking that permissions be, say, "RD" which is illegal.
[2] Are your permissions stored in the array in proper order: "noneRMCDA"? I suspect "noneRDMCA".

- Louie
Report this to a Moderator Report this to a Moderator
 11-May-2004 08:09
User is offline View Users Profile Print this message


Pieter DE WAARD

Posts: 73
Joined: 11-Jul-2003

Louie,

What we are trying to do is manage module and in particular attribute/view access rights. One script creates a module containing the current access definition of the module from which it is launched. Then the module containg the access definition is edited by Db admin, after which a second script is run from the original module, updating the access definition.

Now, the access definition in the AccDefMod is stored in a multi-valued enumerated attribute, containing the possibilities Read, Create, Modify, Delete, Control, Write, Change, none, in this order. As the attribute is an ordinary enumerated type, I can't see that the order can make any difference. But looking at the result, it apparently does. However, the attribute is filled using the AccessRec data type. Maybe order is important in this data type?

If this is the case, this explains then also why the second script is misbehaving, as the the same order is looped thru to set permissions.

We will give the changed order a try as soon as the module is free. Thanks.

-------------------------
Pieter de Waard
www.nhindustries.com
Report this to a Moderator Report this to a Moderator
 11-May-2004 14:42
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

First off: see chapter "Access status" in the online DXL manual: "write" is a lagacy synonym for "modify" and "change" for "control". Remove "write" and "modify" from your attribute.

Second: You should practice setting and clearing permissions on something. Notice that when you go from "none" to "modify" you also get "read". Following are the dependancies:
...."R" auto sets nothing
...."M" auto sets "R"
...."C" auto sets "R"
...."D" auto sets "RM"
...."A" auto sets "RMCD".

Now I haven't done this for a long time so, again, I don't know this is correct. But you can (and I believe you should) merge the permissions together. It would look something like:
Permission pm = null
for value in attribute
{ if permission indicates "R" then pm = pm | read
if permission indicates "M" then pm = pm | read | modify
if permission indicates "C" then pm = pm | read | create
if permission indicates "D" then pm = pm | read | modify | delete
if permission indicates "A" then pm = pm | read | modify | create | delete | control
if permission indicates "none" or "full" then deal with it.
}
Now set the module's acces rights to pm.

Attached find two functions that may help.

- Louie

Edited: 11-May-2004 at 14:43 by Louie Landale
Report this to a Moderator Report this to a Moderator
 12-May-2004 11:48
User is offline View Users Profile Print this message


Pieter DE WAARD

Posts: 73
Joined: 11-Jul-2003

Thanks Louie,

In the mean time, we discovered that the allocation of permissions must be done at once, and not sequencially as we were trying to do. This fits perfectly with your suggestion that some combinations of persmissions are not allowed.

-------------------------
Pieter de Waard
www.nhindustries.com
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.