SPWeb web = SPContext.Current.Web;
SPRoleDefinitionBindingCollection usersRoles = web.AllRolesForCurrentUser;
SPRoleDefinitionCollection roleDefinitions = web.RoleDefinitions;
SPRoleDefinition roleDefinition = roleDefinitions["Full Control"];
if (usersRoles.Contains(roleDefinition))
{
StartWorkflow.Visible = true;
}
else
{
Response.Redirect(web.Url + "/_layouts/sharepointworkflow/accessdenied.aspx");
}
SPRoleDefinitionBindingCollection usersRoles = web.AllRolesForCurrentUser;
SPRoleDefinitionCollection roleDefinitions = web.RoleDefinitions;
SPRoleDefinition roleDefinition = roleDefinitions["Full Control"];
if (usersRoles.Contains(roleDefinition))
{
StartWorkflow.Visible = true;
}
else
{
Response.Redirect(web.Url + "/_layouts/sharepointworkflow/accessdenied.aspx");
}
No comments:
Post a Comment