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 157 posts 385 karma points notactivated
    Jan 14, 2020 @ 12:26
    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 2309 posts 14673 karma points MVP 7x c-trib
    Jan 14, 2020 @ 12:44
    Kevin Jump
    100

    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 157 posts 385 karma points notactivated
    Jan 14, 2020 @ 13:11
    Mus'ab
    0

    Thank You Kevin !

    that's work

    thx a million

  • fatmazayed 41 posts 122 karma points
    Oct 17, 2023 @ 08:20
    fatmazayed
    0

    @Mus'ab how can i get current user group permissions i need to create custom controller and give access permisssions according tom current user permissions

Please Sign in or register to post replies

Write your reply to:

Draft