Non admin user node permission - edit attributes

JaKar
edited February 2, 2023 in Smart View #1

Hello guys, a simple question.

Non admin user in Smart View wants to check the permissions for a node. Use case - execute command on a node (I know node ID) and context.

How can I verify that user has Edit Attributes permission for a node?

// HINT - We are using V2 api. We could switch to v1 API but it is more load for a server

// HINT - Properties command has to do it somehow cause it decides what fields in the form will be active. So there is a way. :)

Tagged:

Comments

  • JaKar
    edited February 6, 2023 #2

    SOLVED

    I found the solution in one of the built in models that use permission rest point for effective permissions. One problem which can surprise you (like me :) ) is that if you have only SEE permission for a node - this model wont return NO Permission nodes. So if you have only SEE there will be undefined permission. Otherwise there is an array of props. User and Connector can be obtained from status.context.