Windows Authentication - roles, etc

E

Elmo Watson

I have a new application I need to do here at work - - however, they want
several things I don't know about and I would like pointers toward the right
direction for learning.

Built on Windows authentication, and based on the person logged in, I need
to be able to find out the manager of that person. Also, if it's a manager,
I need to be able to get a list of anyone who is under that manager.

Is this possible (and how)?
 
D

David

This might give you a pointer, but having never done itmyself, I don't
know... however, look at Active Directory. There is a lot of information can
be stored in active directory. However, if you must go for Windows, then you
need to build your own tree in a database of some sort.

Hope it is of use...

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 
G

Guest

Is this possible (and how)?

Contact your system administrator regarding this matter. In general,
each employee belongs to a single department. If manager has any
special property (for example, memberOf=Management, or a title saying
"Manager blabla", etc.) you can find such user using that property and
department name...
 
D

David

This might get you started. I don't have any specific information. Certainly
not the type of information that you are looking for.


DataSet DS = new DataSet();


System.DirectoryServices.DirectoryEntry entryPC = new
System.DirectoryServices.DirectoryEntry();

DataTable UserList = new DataTable();
DataTable GroupList = new DataTable();
UserList.MinimumCapacity = 10;
UserList.CaseSensitive = false;
GroupList.MinimumCapacity = 10;
GroupList.CaseSensitive = false;

UserList.Columns.Add(new DataColumn("Name",
System.Type.GetType("System.String")));
GroupList.Columns.Add(new DataColumn("Name",
System.Type.GetType("System.String")));



foreach(System.DirectoryServices.DirectoryEntry child in
entryPC.Children)
{
DataRow userRow;

switch (child.SchemaClassName)
{
case "User" :
//users.Nodes.Add(newNode);
userRow = UserList.NewRow();
userRow["Name"] = child.Name;
UserList.Rows.Add(userRow);
UserList.AcceptChanges();
break;
case "Group" :
userRow = GroupList.NewRow();
userRow["Name"] = child.Name;
GroupList.Rows.Add(userRow);
GroupList.AcceptChanges();
//groups.Nodes.Add(newNode);
break;
case "Service" :
//services.Nodes.Add(newNode);
break;
}
//AddPathAndProperties(newNode, child);

//InfoLabel.Text += "<b>" + child.SchemaClassName + "</b><br/>";
}

DS.Tables.Add(UserList);
DS.Tables.Add(GroupList);




--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top