I can see its possible to add start node for each user manually is there any way to add start node for user programatically ? or add user permission to a particular folder using c# code
you can set the start nodes, using the UserService for example :
var user = Services.UserService.GetUserById(myUserId);
user.StartContentIds = new int[] { contentId, anotherContentId };
Services.UserService.Save(user);
equally you can add and remove permissions on nodes using the AssignUserGroupPermission and ReplaceUserGroupPermissions functions on the user service
var edtiorGroup = Services.UserService.GetUserGroupByAlias("editor");
Services.UserService.AssignUserGroupPermission(edtiorGroup.Id, 'U', new int[] { 1412 });
again you need to know your content Ids first (use the ContentService) and you will need to reference the User Permission Codes to understand what letters to set on permissions.
Programatically add folder permission to user
I can see its possible to add start node for each user manually is there any way to add start node for user programatically ? or add user permission to a particular folder using c# code
HI
you can set the start nodes, using the UserService for example :
equally you can add and remove permissions on nodes using the
AssignUserGroupPermission
andReplaceUserGroupPermissions
functions on the user serviceagain you need to know your content Ids first (use the ContentService) and you will need to reference the User Permission Codes to understand what letters to set on permissions.
is working on a reply...