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: User/Group Management
Topic Summary:
Created On: 5-May-2004 16:04
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 Hendrik Grapt, on Friday, May 7, 2004 11:35 AM

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
 5-May-2004 16:04
User is offline View Users Profile Print this message


Hendrik Grapt

Posts: 6
Joined: 8-Jul-2003

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
Report this to a Moderator Report this to a Moderator
 5-May-2004 21:20
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 7-May-2004 11:33
User is offline View Users Profile Print this message


Hendrik Grapt

Posts: 6
Joined: 8-Jul-2003

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