Expose security permissions

In addition to this request which is an ongoing battle for me:

And this one:

It would be great to see the permissions exposed for use in conditions, etc. both on the server side and client.

For example on the server side, run a query for admins, but another verskon for clients. Today, this needs to be based on something other than the security permissions, and of course can be done. But it really should be tied directly to the setting of permissions.

On the client side as well…Hide/show based on permission set in security provider would be much preferred to having to use roles, or setting the permissions via set value for output to client.

Basically an enhancement to the Security Identify action. Expose the permissions along with the identity.

If I understand the question, this is my solution:

image

where siteSecurity is for Admins.