Troubleshooting
Problem
How do you change the IBM Rational DOORS user type by DXL if the error "Access to this property is denied..." has been encountred?
Symptom
The following is failing example code to change user abc's user type to database manager, however it does not work properly. An error "Access to this property is denied..." occurs if the following is used:
<DXL>
User u = find("abc")
setUser (u ,class , "databaseManager")
saveUserRecord (u)
</DXL>
The following will also fail using "set" instead of "setUser":
<DXL>
User u = find("abc")
set (u ,"class" , "databaseManager")
saveUserRecord (u)
</DXL>
Resolving The Problem
Here is the correct sample code to change a user type by DXL:
<DXL>
User u
UserClass uc
string userName = "abc"
string errMsg
errMsg = loadDirectory
u = find (userName)
loadUserRecord (u)
uc = u.class
print stringOf uc "\n"
uc = databaseManager
print "trying to set to " stringOf uc "\n"
u.class = uc
saveUserRecord(u)
errMsg = saveDirectory
</DXL>
Was this topic helpful?
Document Information
Modified date:
01 May 2020
UID
swg21423407