Does anybody know of a webpart, webpart code or client code that will do this?
I'd like to give a security group contribute to a sepecific list, but want to customize copies of the forms they can run and would like to make sure th开发者_StackOverflowey can't run other speicfic forms for the list.
When the webpart sees they are not in a specific security group it will redirect them to an error page or some other page.
You can create a webpart that runs this code:
if (!SPContext.Current.Web.SiteGroups["groupname"].ContainsCurrentUser)
{
SPUtility.Redirect("url", SPRedirectFlags.Default, HttpContext.Current);
}
精彩评论