Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there,
Can anyone please post a sample code or direct me to one that shows how to Set Single user protection when creating a new doc?
Many thanks
mkariti
Update:
I use the following:
Access.ProtectPage(true, doc.Id, loginDocId, errorDocId);
Access.AddMembershipUserToDocument(doc.Id, "MemberLoginName");
I think Im half way there its just that I somehow need to update the access and cant seem to get it right.
It creates the Single user Access / member but I can access the document unless I update the access manually via the node.
By updating I mean just literally click the update button and its fine.
Any idea?
Cheers
Ok So I finally got it!
In order to set the single user protection for member I have to create a new Role or to use an existing one and as my users are under the same MemberGroup I must create a new membergroup/document/member -----> Must be a better way to do that!
Roles.CreateRole("xxx"); Roles.AddUserToRole("Name","xxx"); Access.ProtectPage(true, doc.Id, loginDocId, errorDocId); Access.AddMembershipRoleToDocument(doc.Id, "xxx"); Access.AddMembershipUserToDocument(doc.Id, "Name");
Im off to my thinking spot............
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Set Single user protection when creating a new doc
Hi there,
Can anyone please post a sample code or direct me to one that shows how to Set Single user protection when creating a new doc?
Many thanks
mkariti
Update:
I use the following:
Access.ProtectPage(true, doc.Id, loginDocId, errorDocId);
Access.AddMembershipUserToDocument(doc.Id, "MemberLoginName");
I think Im half way there its just that I somehow need to update the access and cant seem to get it right.
It creates the Single user Access / member but I can access the document unless I update the access manually via the node.
By updating I mean just literally click the update button and its fine.
Any idea?
Cheers
mkariti
Ok So I finally got it!
In order to set the single user protection for member I have to create a new Role or to use an existing one and as my users are under the same MemberGroup I must create a new membergroup/document/member -----> Must be a better way to do that!
Im off to my thinking spot............
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.