• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

NAB App Security

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NAB App Security

    I have a Grid Edit app that I want to make view-only for a specific user group. I see the example for using a Startup program, but how do I refer a group rather than a specific user?

    Thanks,

    Behyar

    pic.png

  • #2
    Hi Behyar -

    The EXNABSTART template program provides you with the "gUserId" variable (the unique user id) and this can be used passed to vvSecure_isMember to determine if that user is a member of a specific group.

    Code:
    // MY_GROUP_ID contains the unique group id that you want to check for....
    //   VVGROUPS contains this information in case you need to retrieve the group id...
    //
    exec sql select vvGrpId into: MY_GROUP_ID from vvGroups
                  where vvGrpName = 'SOME_GROUP_NAME';
    if not (vvSecure_isMember(MY_GROUP_ID:gUserId){
      disableFeature('SOME_FEATURE');
    }

    Comment


    • #3
      Thanks Sean, that worked great.

      Comment

      Working...
      X