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: "canDelete (module)"
Topic Summary: Does this even make sense?
Created On: 13-Sep-2006 00:12
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.
Answer This question was answered by Louie Landale, on Friday, September 22, 2006 1:56 AM

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
 13-Sep-2006 00:12
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

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
Report this to a Moderator Report this to a Moderator
 13-Sep-2006 08:29
User is offline View Users Profile Print this message


Chris Collingwood Hancock

Posts: 24
Joined: 8-Sep-2006

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':

Hope it's of some use to you,

Regards,


Chris P. Collingwood-Hancock

Report this to a Moderator Report this to a Moderator
 13-Sep-2006 15:15
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer 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
Report this to a Moderator Report this to a Moderator
 22-Sep-2006 01:56
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

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
Report this to a Moderator Report this to a Moderator
 25-Sep-2006 09:03
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

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})"
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.