PermissionExpressionParser.Evaluate method

namespace: Serenity.Services   assemblySerenity.Net.Core

Evaluates a list of tokens in RPN notation, produced from ShuntingYard method.

public static bool Evaluate(IEnumerable<string> rpnTokens, Func<string, bool> hasPermission)
parameter description
rpnTokens List of tokens in RPN notation
hasPermission A method that returns True if the user has given permission

Return Value

True if expression evaluates to true

See Also