Security Expressions

Overview

A Security Expression defines the permissions necessary to access a resource.  They can be assigned to many different BBS resources, such as menus, file areas, and message forums.  A built-in wizard makes it easy to create expressions but nevertheless you should understand the syntax because they control how users will interact with your BBS.

A security expression is merely a Boolean expression that resolves to True or False.  A result of True means the user is granted access to the resource; a result of False means the user is denied access to a resource.  Example expressions include:

Expressions are more flexible than user levels.

Boolean Operators

Boolean operators are not case-sensitive (e.g. "AND" is the same as "and").

Several operators have symbols that can be used in place of the word.  These symbols should be familiar to programmers using any C or C-like language (Java, C++, C#, etc).

AND Operator

Syntax: operand AND operand
Alternate Symbol: &&

Resolves to True if both operands are also True.  You may use the symbol && instead of the word AND.  The following examples resolve to True:

The following examples resolve to False:

NOR Operator

Syntax: operand NOR operand
Alternate Symbol: None

Resolves to True if both operands are False.  This is equivalent to "(NOT operand1) AND (NOT operand2)".

NOT Operator

Syntax: NOT operand
Alternate Symbol: !

Resolves to True if the operand is False; resolves to False if the operand is True.  You can also use the ! symbol.

OR Operator

Syntax: operand OR operand
Alternate Symbol: ||

The OR operator returns true if either operand is true.  You may use the symbol || instead of the word OR.  The following examples resolve to True:

The following examples resolve to False:

Comparison Operators

= (Equals)

Resolves to True if both operands are equal.

> (Greater Than)

Resolves to True if the first operand is greater than the second operand.

>= (Greater Than or Equal To)

Resolves to True if the first operand is greater than or equal to the second operand.

< (Less Than)

Resolves to True if the first operand is less than the second operand.

<= (Less Than or Equal To)

Resolves to True if the first operand is less than or equal to the second operand.

<> or != (Not Equal)

Resolves to True if the operands are not equal.

Sets

value BETWEEN value TO value

list CONTAINS value

Resolves to True if the list contains the specified value.

operand IN (value, value...)

The IN operator resolves to True if the first operand is located within the designated list.  Assume a user has a security level of 100 and that level 100 has a name of "User".  The following expressions resolve to True: