// All domain users and groups
// that are Security Principals for the website
// This is the list you see in /_layouts/user.aspx
SPUserCollection users = web.Users;
Response.Write("All domain user principals in this site: " + "
");
foreach (SPUser user in users)
{
Response.Write(user.Name + "
");
}
// All domain users and groups within the site collection
users = web.SiteUsers;
Response.Write("All users in this site collection: " + "
");
foreach (SPUser user in users)
{
Response.Write(user.Name + "
" );
}
Tuesday, January 13, 2009
Security Permission Inheritance
SPSite site = SPContext.Current.Site;
SPWeb web = SPContext.Current.Web;
// Test to see if the site has unique permissions
if (web.HasUniqueRoleAssignments)
{
Response.Write(web.Title + " does not inherit permissions
" );
}
else
{
Response.Write(web.Title + " inherits permissions
" );
}
SPWeb web = SPContext.Current.Web;
// Test to see if the site has unique permissions
if (web.HasUniqueRoleAssignments)
{
Response.Write(web.Title + " does not inherit permissions
" );
}
else
{
Response.Write(web.Title + " inherits permissions
" );
}
Monday, January 12, 2009
Uncustomized and Customized Pages
Ghosted - Uncustomized
Unghosted - Customized
In WSS v3 pages exist in one of two states: customized or uncustomized. An uncustomized page is one that is listed in the site's contents database, but the actual source of the page (the file) resides on the file system, and the content database simply contains a link pointing to the file. A customized page is also listed in the content database, but the source of the page is also stored in the database. Future requests for that page (in the context of a specific site) will be served from the database, not from the file system.
Unghosted - Customized
In WSS v3 pages exist in one of two states: customized or uncustomized. An uncustomized page is one that is listed in the site's contents database, but the actual source of the page (the file) resides on the file system, and the content database simply contains a link pointing to the file. A customized page is also listed in the content database, but the source of the page is also stored in the database. Future requests for that page (in the context of a specific site) will be served from the database, not from the file system.
Subscribe to:
Posts (Atom)