To add custom permission levels:
Site Settings > Advanced permissions > Settings > Permission Levels > Add a Permission Level
To access all users having a particular Permission Level.
public string GetEmailForRole(string RoleName)
{
const string NDA_SITENAME = http://Server:801/sites/SiteName;
StringBuilder EmailList = new StringBuilder();
SPSite NDASite = new SPSite(NDA_SITENAME);
SPWeb NDAWeb = NDASite.OpenWeb();
foreach (SPRole role in NDAWeb.Roles)
{
if (role.Name == RoleName )
{
SPUserCollection spusers = role.Users;
foreach (SPUser user in spusers)
{
if( user.Email != "")
{
EmailList.Append(user.Email);
EmailList.Append(";");
}
}
}
}
return EmailList.ToString();
}
Sunday, April 27, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
I think we need to consider the ad security groups too....
Post a Comment