CurrentUserHasSiteServiceFunction

Qubes 10.0 Tests if the current user has a particular site/service/function.

Syntax

CurrentUserHasSiteServiceFunction(site, service, function)
site = the site name to test for
service = the service name to test for
function = the function name to test for

Remarks

Note: This function is evaluated statically server-side, the parameters should thus be a constants.

When no user is connected, the function returns False.

To omit one of the filters, pass an empty string in the corresponding parameter. But if a value is passed it must be a correct reference, or the result will be an error.

Example

This enables A1 when the current user has the 'Manager' function for the 'Engineering' service, regardless of the site.

A1.Enabled =CurrentUserHasSiteServiceFunction('', 'Engineering', 'Manager')

Classification

Qubes