![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Set delete permission Topic Summary: Created On: 10-May-2004 15:06 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Set delete permission
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.