I have some code that I am writing that is only to be run by those that have Admin rights (can create, modify, delete projects/folders/modules). How do I go about querying to verify that the user running the code has the proper access rights? Mike.P.Adams - Tue Jun 09 13:58:50 EDT 2015 |
Re: Determining User Access Rights I suggest establishing a simple set of standard groups with basic rights for each project you createt, maybe have a script to create them that you run when ever you create a project. one of these groups could be "<Mikes Project> Administrators". Recommend giving Administrators good access to their own projects, but no access to add other projects. You could then check for membership of this project. You should of course also check that the user can write to a particular module/ folder using the canWrite, canModify functions dxl makes available to you. Hope that gets you started! |
Re: Determining User Access Rights Richard, Thanks for the reply. I did intend on using User Groups to define access and that is the part that I am working on now. My issue is that I do not see how to verify if the user has Write access to the folder (or project). I see how to do it for modules, but the way this code is being set-up, when it is initially run, the project is being created. There are no modules yet existing. I want to verify that only those people with access rights to create projects and folders are running the code. This is a new area for me in playing with user access rights, so do not assume too much on my end on knowing which commands to use. |
Re: Determining User Access Rights
canControl(item) bool canControl({Item i|Folder f) Operation Returns true if the current Rational DOORS user can change the access controls on the item or folder specified by the argument. Otherwise, returns false. |
Re: Determining User Access Rights Thanks! |