Display A SharePoint Users Role Collection
This snippet shows you how to display a particular users set of roles based on the user name parameter.
- int Roles = Site.Roles.Count;
- for (int iRole = 0; iRole < nRoles; iRole++)
- {
- SPRole Role = Site.Roles[iRole];
- UInt32 hexPermMask = (UInt32)Role.PermissionMask;
- lstSiteRoles.Items.Add(
- "Role" + iRole.ToString() + ": "
- + Role.Name
- + " [Type:" + Role.Type.ToString()
- + " PermMask:"
- + hexPermMask.ToString("X4") + " " + Role.PermissionMask.ToString() + " "
- + "]" );
- }
Articles & Research
SharePoint Security
SharePoint Development
SharePoint Architecture
Claims Authentication
Forefront For SharePoint
AIS / Dynamics GP
Team Foundation Server
Pex And Moles
ISA/TMG/IAG/UAG
DPM
Cardspace
Research Methodology
Rural ICT Development
Numerical Analysis
Multi-Level Research
Knowledge Management
Personal/Off-Topic