开发者

Give Right to SPListItem

Following code is use to give permission to user to access SPListItem

//Add current user
tempRoleAssignment = new SPRoleAssignment((SPPrincipal)currentUser);
tempRoleAssignment.RoleDefinitionBindings.Add(web.RoleDefinitions.GetByType(SPRoleType.Contributor));
item.RoleAssignments.Add(tempRoleAssignment);

but it is not work when current user domain server is different than the sharepoint server.

More information My Sharepoint server name is spserver. Domain server name is domain开发者_如何学运维server. When I try to give right to user of domainserver to sharepoint server SPListItem it cannot assign as I can able give right to any sharepoint group. It does not fire any error/exception by using above code but user cannot have right to access that perticular SPListItem

I wonder if anyone can help me?


Thus, current user is on another domain than SharePoint server? How have you implemented this, one-way or two-way trusts?


Did you run an update on role assignment? (roleassignment.update() && pricipal.update()).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜