![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: "canDelete (module)" Topic Summary: Does this even make sense? Created On: 13-Sep-2006 00:12 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Didn't run tests, but looking at that command in the DXL manual section "Module access controls" in its context (neighbor commands canCreate, canControl, and canModify), its obvious that 'canDelete(module)' returns true if the current user posses delete access to the module, that's the 'D' in 'RMCDA' access. I would also suppose, without testing, that you 'canDelete' within a module if you posses actual create 'C' access, and when delete is 'propagated' along with create access. Thus, 'canDelete(module)' means "can the current user delete things inside the module". - Louie | |
![]() |
|
I'm adding a bit of error checking to a script that involves deleting a file. I want to make sure that the user can delete it, before trying to do so.
I came across the following handy-sounding function in the ref manual: bool canDelete(Module m) Operation Returns true if the current DOORS user can delete module m; otherwise, returns false. I was testing the script and it wasn't behaving how I thought it ought to--it always said I couldn't delete the module, no matter what (even if I could press 'delete' in the DB explorer). Then I thought about it some more... This function requires a Module type variable, and will tell you if you can delete it..... You can only have a Module type variable for a document that is open..... And you can't delete a module that is open. Have I missed something, or is this function a bit of a catch-22? Chris |
|
![]() |
|
![]() |
|
Hi, you may wish to try the following which was the approach we made some months back. The keyword in this case is 'control' as opposed to 'canDelete': |
|
![]() |
|
![]() |
|
Didn't run tests, but looking at that command in the DXL manual section "Module access controls" in its context (neighbor commands canCreate, canControl, and canModify), its obvious that 'canDelete(module)' returns true if the current user posses delete access to the module, that's the 'D' in 'RMCDA' access.
I would also suppose, without testing, that you 'canDelete' within a module if you posses actual create 'C' access, and when delete is 'propagated' along with create access. Thus, 'canDelete(module)' means "can the current user delete things inside the module". - Louie |
|
![]() |
|
![]() |
|
Ohhh.....so you can delete the module if you have delete access to the *folder*, not to the module. Makes sense, now that I think about it. (Although I haven't test that...all this supposition is sure fun though.)
Chris: Thanks for the code. It'll probably come in really handy some day. Chris |
|
![]() |
|
![]() |
|
To find out if you can delete a module without opening it, treat it as an Item and use "bool canDelete({Item i|Folder f})"
|
|
![]() |
Telelogic DOORS
» DXL Exchange
»
"canDelete (module)"
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.