Web Interface Command Filter on Group Member

So I am trying to see if it is possible to only show a custom group command to a user only if that user is NOT a member. I am aware of the AVFilter in the <IsCommandAllowedFilter> tag, but that seems like it only takes hard-coded strings, in which my case would need to be more "dynamic" since it would vary by if if the current user is a member of this group.

Is this possible to do in ARS? I was thinking maaaaybe I could leverage the 'IsCommandAvailable.vbs' script but I am not sure how to pass the current user's information and that group they are viewing to it to return if they are a member.

Any feedback/suggestions would be most appreciated. Thanks.

Parents
  • This may not be the most practical solution for you but...

    Would it be possible for you to make all members of the group Secondary Owners?

    Then, you could apply an AT that would grant this built in AR security principal the ability to write to a specific property of the group.  In this case, I would create an Access Template that allows a write to "Web Page Address".  I would assign this AT to the Secondary Owners of the group.

    I would then use this attribute to control the display of my custom command as shown:

    You could use a virtual attribute for this purpose too.

    I hope this makes sense at least.

Reply
  • This may not be the most practical solution for you but...

    Would it be possible for you to make all members of the group Secondary Owners?

    Then, you could apply an AT that would grant this built in AR security principal the ability to write to a specific property of the group.  In this case, I would create an Access Template that allows a write to "Web Page Address".  I would assign this AT to the Secondary Owners of the group.

    I would then use this attribute to control the display of my custom command as shown:

    You could use a virtual attribute for this purpose too.

    I hope this makes sense at least.

Children
  • Ahhh, while I hugely appreciate the response, that wouldn't be practical in our environment. My end goal is to create a command "Request Group Membership" that allows any user to send a request to be added into said group, but I only want this command viewable if they are not in the group. (Doesn't make much sense to request for something you already have.)

    I *feel* like I could probably get it done with the 'isCommandAvailable.vbs' and the VBSFIlter associated with it, but I am struggling to find good documentation on the byRef data type and what I can do in those vbscripts. (I just don't know how to reference the group that the user is looking at it and the user themselves to write this function.