![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: User/Group Management Topic Summary: Created On: 5-May-2004 16:04 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Thank you, It's solved string getGroupMembershipForUser( User u ) { Group g Skip groupSkip = createString int groupCount = 0 for g in groupList do { if ( member( g, u ) ) { string groupName = g.name put( groupSkip, groupName, groupName ) } } string groupName = "" string groupNames = "" for groupName in groupSkip do { if ( !null groupNames ) { groupNames = groupNames "\n" } groupNames = groupNames groupName } delete groupSkip return groupNames } string s = (obj."SysLogOn") if (existsUser(s)) { User u = find(s) string m = getGroupMembershipForUser u "\n" display m } Hendrik Grapt | |
![]() |
|
I'm looking to write a dxl script for a column in a User Module (a Module where all Users of the Database are listed).
There is a Text attribute called "SysLogOn" where the loginnames are stored. Is there a way to generate a column that shows all Groups, the users belong to from this given Attribute (SysLogOn)? Thanks for your help. Hendrik Grapt |
|
![]() |
|
![]() |
|
Attached is a full DXL I got and modified that generates user and group information. It has the examples you'll need to do what you want.
Look for "systemLoginName" in DXL help; its in the User Group Properties section. Be sure to "ensureUserRecordLoaded" after getting the User handle. If you have a module housing each legal DOORS user (each as its own object) then it makes no sense to talk about a layout program that generates all groups and their membership. If you DID write one then each user would have all that information in its entry in the column. Perhaps you intend this Users module to have a 2nd section with all the groups; one group per object. Then you COULD write a layout DXL showing the membership of THAT group. But your layout DXL will need to be able to distinquish between a user name and a group name, as follows: Group grp = find(Name) User usr = find(Name) if (!null grp) then its a group; get and display its membership elseif (!null usr) then its a user; do nothing else Name is neither a User nor a Group; report User/Group no longer exists Objects representing users will end up with nothing in the Membership column. - Louie |
|
![]() |
|
![]() |
|
Thank you, It's solved
string getGroupMembershipForUser( User u ) { Group g Skip groupSkip = createString int groupCount = 0 for g in groupList do { if ( member( g, u ) ) { string groupName = g.name put( groupSkip, groupName, groupName ) } } string groupName = "" string groupNames = "" for groupName in groupSkip do { if ( !null groupNames ) { groupNames = groupNames "\n" } groupNames = groupNames groupName } delete groupSkip return groupNames } string s = (obj."SysLogOn") if (existsUser(s)) { User u = find(s) string m = getGroupMembershipForUser u "\n" display m } Hendrik Grapt |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
User/Group Management
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.