Copied to clipboard

Flag this post as spam?

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


  • Mus'ab 119 posts 301 karma points notactivated
    1 week ago
    Mus'ab
    0

    How to get user group permissions?

    Hi all

    i am trying to get a list of permissions that a current user have on a specific nodes when i try to get the list its returned as a list of characters like below

    enter image description here

    i think that every character is a shortcut of some thing like p to publish or u to unpublished might-be d to delete but i cant find any place talking about that or find the meaning of these characters so any body have any idea ?

  • Kevin Jump 1562 posts 10037 karma points MVP 3x c-trib
    1 week ago
    Kevin Jump
    0

    Hi

    you're right these are the letters assigned to the actions, they are defined in IAction classes in Umbraco.Web.Actions

    https://github.com/umbraco/Umbraco-CMS/tree/v8/dev/src/Umbraco.Web/Actions

    the letters are declared in these classes and you should be able to use that check for certain permissions:

    for example, this should return true if the user has Publish permissions

    using Umbraco.Web.Actions;
    
    
    if (asd.Contains(ActionPublish.ActionLetter))
    {
    
    }
    
  • Mus'ab 119 posts 301 karma points notactivated
    1 week ago
    Mus'ab
    0

    Thank You Kevin !

    that's work

    thx a million

Please Sign in or register to post replies

Write your reply to:

Draft