Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan 7 posts 59 karma points
    Aug 27, 2015 @ 14:41
    Dan
    0

    How to update Role based Permissions when a doc is saved

    I am using Umbraco 7.2.8. When a new Document of a specific type is saved, I am hooking into the ContentService.Saved event and I want to be able to set the Public Access to only allow a specific member group access to it. Just like I would do using the Gui here.

    enter image description here

    I see in the documentation here https://our.umbraco.org/documentation/Reference/Management/Services/ContentService There are a couple methods like

    .AssignContentPermission(IContent content, char permission, IEnumerable userIds)

    and

    ReplaceContentPermissions(EntityPermissionSet permissionSet)

    which both allow me to pass in a list of userIds users that have access but I am interested in setting the membership groups that have access as well as the Login Page and Error Page. How can I do this?

  • Dan 7 posts 59 karma points
    Aug 31, 2015 @ 14:37
    Dan
    100

    Got this answered on Stackoverflow here

Please Sign in or register to post replies

Write your reply to:

Draft