Hi. I'm baaack. :-)
I am giving a role, CreatePage permissions (using code you supplied me in this thread), but users in that role cannot execute the PageFacade.Duplicate() method. What permissions do I give a role programatically so that they can run code which executes the PageFacade.Duplicate() method?
The error I am getting is simply: You have no permissions to create pages
Below is the code where I give the role the permissions. Toward the bottom you will see
I thought that would do what I need, but it doesnt.
IDEA: below you will see a variable "pn" Does that have to be the page that I am Duplicating? In the code below it is not.
foreach (string roleName in listRoleNames)
var rm = RoleManager.GetManager();
var objRole = rm.GetRole(roleName);
#region _ get the permission set _
string sn = SecurityConstants.Sets.Pages.SetName;
Guid pageNodeId = pn.Id;
Guid principalId = objRole.Id;
Permission thePermission = pn.Permissions.Where(p =>
p.SetName == sn &&
p.ObjectId == pageNodeId &&
p.PrincipalId == principalId).FirstOrDefault();
if (thePermission == null)
thePermission = sfPageManager.CreatePermission(sn, pageNodeId, principalId);
#region _ grant the actions to the permission _