Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
access:requirements [2011/11/12 01:34] – created digitalman | access:requirements [2021/08/15 15:47] (current) – [Value Parameters] UDR represents a upload/download BYTE ratio digital man | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Access Requirements ====== | ====== Access Requirements ====== | ||
- | ARS stands for Access Requirement Strings. Access requirement strings | + | Access Requirement Strings |
- | to specify the requirements of a user to have access to features/ | + | |
- | Synchronet BBS. The string can consist entirely of English keywords and | + | ===== Overview ===== |
+ | |||
+ | You will find in [[util: | ||
+ | |||
+ | Most '' | ||
+ | |||
+ | Some '' | ||
+ | |||
+ | * Operator Requirements | ||
+ | * Exemption Requirements | ||
+ | * Moderated Posting User | ||
+ | * Pre-pack QWK Requirements | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | [[util: | ||
+ | |||
+ | < | ||
+ | ╔══════════════════════════════════════════════════════════╗ | ||
+ | ║ Main Group Requirements | ||
+ | ╠══════════════════════════════════════════════════════════╣ | ||
+ | ║ │Requirement String () ║ | ||
+ | ║ │Clear Requirements | ||
+ | ║ │Set Required Level ║ | ||
+ | ║ │Set Required Flag ║ | ||
+ | ║ │Set Required Age ║ | ||
+ | ║ │Set Required Sex ║ | ||
+ | ║ │Set Required Connect Rate ║ | ||
+ | ║ │Set Required Post/Call Ratio (percentage) | ||
+ | ║ │Set Required Number of Credits | ||
+ | ║ │Set Required Upload/ | ||
+ | ║ │Set Required Upload/ | ||
+ | ║ │Set Required Time of Day ║ | ||
+ | ║ │Set Required Day of Week ║ | ||
+ | ║ │Set Required Node Number | ||
+ | ║ │Set Required User Number | ||
+ | ║ │Set Required Time Remaining | ||
+ | ║ │Set Required Days Till Expiration | ||
+ | ╚══════════════════════════════════════════════════════════╝ | ||
+ | </ | ||
+ | |||
+ | From this dialog screen, you can edit the Requirement String directly, or use the additional menu options to add the most common requirement parameters (and values) or clear the requirement string. | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | Access Requirement Strings | ||
numbers or use short-hand symbols to fit a large number of security | numbers or use short-hand symbols to fit a large number of security | ||
requirements into the limited space allowed for access requirement | requirements into the limited space allowed for access requirement | ||
Line 11: | Line 56: | ||
< | < | ||
- | usage: [not] [parm] [not] [equal] < | + | usage: [not] [param] [not] [equal] < |
where: not is the word " | where: not is the word " | ||
- | parm is one of any keywords (or short-hand symbols) that specifies | + | param |
a specific required parameter (default is LEVEL) | a specific required parameter (default is LEVEL) | ||
| | ||
Line 25: | Line 70: | ||
be met to match the requirement | be met to match the requirement | ||
</ | </ | ||
+ | |||
+ | ==== Logic Operators ==== | ||
+ | Logic operators may exist between one or more Boolean or Value Parameters. When no logic operator is specified, the default logic requirement is GREATER_OR_EQUAL and when multiple parameters are specified, '' | ||
+ | |||
+ | ^ Keyword | ||
+ | |AND | & |More than one requirement (optional) | | ||
+ | |NOT | ! |Logical negation (e.g. NOT EQUAL) | | ||
+ | |EQUAL | ||
+ | |OR | %%|%% |Either of two or more parameters is required | | ||
+ | | | ||
+ | | | ||
+ | |||
+ | ==== Boolean Parameters ==== | ||
+ | |||
+ | Boolean parameters are evaluated as //true// or //false// without any specified value for comparison. | ||
+ | |||
+ | ^Keyword | ||
+ | |ACTIVE | ||
+ | |ANSI | ||
+ | |PETSCII | ||
+ | |ASCII | ||
+ | |UTF8 | ||
+ | |CP437 | ||
+ | |DELETED | ||
+ | |DOS | | BBS is running on MS-DOS | | ||
+ | |EXPERT | ||
+ | |GUEST | ||
+ | |INACTIVE | ||
+ | |LINUX | ||
+ | |LOCAL | ||
+ | |OS2 | | BBS is running on OS/2 | | ||
+ | |QNODE | ||
+ | |QUIET | ||
+ | |RIP | $* | User is connected with a RIP-compatible terminal | | ||
+ | |SYSOP | ||
+ | |WIN32 | ||
+ | |WIP | | User is connected with a WIP-compatible terminal | | ||
+ | |UNIX | ||
+ | |||
+ | ==== Value Parameters ==== | ||
+ | |||
+ | Value parameters require a //value// (e.g. word or number) following the parameter keyword or symbol. This parameter is compared against the criteria of the system or the user using the current comparison logic. | ||
+ | |||
+ | ^Keyword | ||
+ | |AGE |$A |User' | ||
+ | |BPS |$B |User' | ||
+ | |COLS | ||
+ | |CREDIT |$C |User' | ||
+ | |DAY |$W |Day of the week (Sun, Mon, Tue, etc. or 0-6)| | ||
+ | |DIR |$J |Current file directory (Internal code or 1-65535)| | ||
+ | |DLS | | ||
+ | |DLK | | ||
+ | |DLM | | ||
+ | |EXEMPT |$X |[[Exemptions]] flag (A-Z)| | ||
+ | |EXPIRE |$E |Days till user account expires (0-65535)| | ||
+ | |FILE_CMDS | |Number of executed file menu commands (0-65535)| | ||
+ | |FLAG |$F |User' | ||
+ | |GROUP |$M |Current message group (1-65535)| | ||
+ | |HOST | ||
+ | |IP | ||
+ | |LASTON |$Y |Days since last logon (0-65535)| | ||
+ | |LEVEL |$L |User' | ||
+ | |LIB |$I |Current file library (1-65535)| | ||
+ | |LOCAL |$G |Logged on locally (no value argument)| | ||
+ | |LOGONS | ||
+ | |MAIN_CMDS | ||
+ | |NODE |$N |Current node (1-250)| | ||
+ | |PCR |$P |User' | ||
+ | |PROT | ||
+ | |RANDOM |$Q |Random number between 0 and value argument (0-65535)| | ||
+ | |REST |$Z |[[Restrictions]] flag (A-Z)| | ||
+ | |ROWS | ||
+ | |SEX |$S |User' | ||
+ | |SHELL | ||
+ | |SUB |$H |Current message sub-board (Internal code or 1-65535)| | ||
+ | |TERM | ||
+ | |TIME |$T |Time of day (HH:MM, 0-23:59)| | ||
+ | |TLEFT |$R |User' | ||
+ | |TUSED |$O |User' | ||
+ | |UDR |$K |User' | ||
+ | |UDFR |$D |User' | ||
+ | |ULS | | ||
+ | |ULK | | ||
+ | |ULM | | ||
+ | |USER |$U |User' | ||
+ | |||
+ | ==== General Usage Examples ==== | ||
+ | |||
+ | ===General Example #1=== | ||
+ | |||
+ | %%LEVEL 60%% | ||
+ | |||
+ | This string specifies that only users with a level of 60 OR HIGHER meet this requirement. The space between the level and the required value is optional: | ||
+ | |||
+ | %%LEVEL60%% | ||
+ | |||
+ | is functionally equivalent, but doesn' | ||
+ | |||
+ | %%$L 60%% | ||
+ | |||
+ | is also functionally equivalent. Once again, the space between the short hand symbol and the required value is optional. If a parameter is not specified, the requirement is assumed to be LEVEL. So the following string: | ||
+ | |||
+ | %%60%% | ||
+ | |||
+ | is also valid and evaluates the same as the above strings. | ||
+ | |||
+ | ===General Example #2=== | ||
+ | |||
+ | %%NOT LEVEL 60%% | ||
+ | |||
+ | This string specifies that only users with a level BELOW 60 will meet the requirement. The " | ||
+ | |||
+ | %%LEVEL NOT 60%% | ||
+ | |||
+ | evaluates identically to the first string in this example. | ||
+ | |||
+ | Short-hand symbols may be used to abbreviate the string: | ||
+ | |||
+ | %%LEVEL !60%% | ||
+ | |||
+ | %%$L!60%% | ||
+ | |||
+ | %%!60%% | ||
+ | |||
+ | have exactly the same meaning as the first string in this example. | ||
+ | |||
+ | ===General Example #3=== | ||
+ | |||
+ | %%LEVEL EQUAL 60%% | ||
+ | |||
+ | This string specifies that only users with a level EQUAL TO 60 will meet this requirement. The key word " | ||
+ | |||
+ | %%LEVEL EQUALS 60%% | ||
+ | |||
+ | and | ||
+ | |||
+ | %%LEVEL EQUAL TO 60%% | ||
+ | |||
+ | are both functionally equivalent to the first string in this example. Again, short-hand symbols may be used to make the string shorter: | ||
+ | |||
+ | %%LEVEL = 60%% | ||
+ | |||
+ | evaluates identically to the above example strings and the space on either side of the ' | ||
+ | |||
+ | %%LEVEL=60%% | ||
+ | |||
+ | is valid and may be preferred by some sysops. Since level is the default parameter type, the following string is also valid: | ||
+ | |||
+ | %%=60%% | ||
+ | |||
+ | ===General Example #4=== | ||
+ | |||
+ | %%LEVEL 60 AND FLAG 1A%% | ||
+ | |||
+ | This string indicates that the user must have a level of 60 or higher AND have the flag ' | ||
+ | |||
+ | %%LEVEL 60 FLAG 1A%% | ||
+ | |||
+ | has the same meaning, but may be confusing when read. When specifying a flag from flag set #1, the set number may be eliminated: | ||
+ | |||
+ | %%LEVEL 60 AND FLAG A%% | ||
+ | |||
+ | is functionally the same and is the preferred method of referring to flags from flag set #1. When specifying the flag set, spaces can be on either side of the number, or eliminated entirely: | ||
+ | |||
+ | %%LEVEL 60 AND FLAG1 A%% | ||
+ | |||
+ | and | ||
+ | |||
+ | %%LEVEL 60 AND FLAG 1 A%% | ||
+ | |||
+ | and | ||
+ | |||
+ | %%LEVEL 60 AND FLAG1A%% | ||
+ | |||
+ | have the same meaning as the first string in this example, but are probably not as easy to read as the second string in this example. | ||
+ | |||
+ | The following strings all have the same meaning as the first string in this example but have been shortened using symbols and other short-cuts: | ||
+ | |||
+ | %%LEVEL 60 & $F A%% | ||
+ | |||
+ | %%$L60 AND $FA%% | ||
+ | |||
+ | %%$L60$FA%% | ||
+ | |||
+ | %%60$FA%% | ||
+ | |||
+ | but for reasons of clarity, the first string is preferred if space allows. | ||
+ | |||
+ | ===General Example #5=== | ||
+ | |||
+ | %%SEX F OR LEVEL 90%% | ||
+ | |||
+ | This string specifies that the user must be of FEMALE gender OR have a level of 90 or higher. The following strings are functionally equivalent to the above: | ||
+ | |||
+ | %%SEX F | LEVEL 90%% | ||
+ | |||
+ | %%SEXF|LEVEL90%% | ||
+ | |||
+ | %%$SF | $L90%% | ||
+ | |||
+ | %%$SF|$L90%% | ||
+ | |||
+ | ===General Example #6=== | ||
+ | |||
+ | %%USER NOT EQUAL TO 20%% | ||
+ | |||
+ | This string specifies that user #20 will not meet the requirement. | ||
+ | |||
+ | __Shortened using symbols:__ | ||
+ | |||
+ | %%$U!=20%% | ||
+ | |||
+ | ===General Example #7=== | ||
+ | |||
+ | %%BPS 9600 OR NOT TIME 19:00%% | ||
+ | |||
+ | This string specifies that the user must be connected at 9600bps or higher, OR the time of day must be before 7pm. The value for the TIME parameter is in the format 24 hour format of HH:MM. If the specified time is on an even hour, then ": | ||
+ | |||
+ | %%BPS 9600 OR NOT TIME 19%% | ||
+ | |||
+ | has the same meaning. | ||
+ | |||
+ | You may also omit the " | ||
+ | |||
+ | %%BPS 96 OR NOT TIME 19%% | ||
+ | |||
+ | __Shortened versions:__ | ||
+ | |||
+ | %%$B 9600 OR NOT $T19%% | ||
+ | |||
+ | %%BPS9600|!TIME19%% | ||
+ | |||
+ | %%$B96|!$T19%% | ||
+ | |||
+ | ===General Example #8=== | ||
+ | |||
+ | %%BPS 9600 OR TIME NOT 18:00 OR TIME 21:30%% | ||
+ | |||
+ | This string specifies that the user must be connected at 9600bps or higher, OR the time of day must be before 6pm, OR the time of day must be after 9:30pm. | ||
+ | |||
+ | When specifying multiple parameters of the same type consecutively (in this example, two of the required parameters are " | ||
+ | |||
+ | %%BPS 9600 OR TIME NOT 18:00 OR 21:30%% | ||
+ | |||
+ | has the same meaning as the first string in this example. | ||
+ | |||
+ | __Shortened versions:__ | ||
+ | |||
+ | %%$B 9600 OR NOT $T 18 OR 21:30%% | ||
+ | |||
+ | %%$B96|$T!18|21: | ||
+ | |||
+ | ===General Example #9=== | ||
+ | |||
+ | %%FLAG A OR FLAG B OR FLAG C OR LEVEL 90%% | ||
+ | |||
+ | The above string specifies that a user must have flag A, flag B, flag C, (all from flag set #1) or a level of 90 or higher to meet the requirement. Using the " | ||
+ | |||
+ | %%FLAG A OR B OR C OR LEVEL 90%% | ||
+ | |||
+ | Utilizing symbols, we can shorten it even further: | ||
+ | |||
+ | %%FLAG A|B|C OR LEVEL 90%% | ||
+ | |||
+ | __Taking it to extremes:__ | ||
+ | |||
+ | %%$FA|B|C|$L90%% | ||
+ | |||
+ | ===General Example #10=== | ||
+ | |||
+ | %%USER EQUALS 145 OR LEVEL 90%% | ||
+ | |||
+ | This string indicates that user number 145 will meet the requirement and all users with level 90 and higher (sysops). | ||
+ | |||
+ | __Best shortened as:__ | ||
+ | |||
+ | %%USER=145 OR LEVEL 90%% | ||
+ | |||
+ | __For ultimate compression: | ||
+ | |||
+ | %%$U=145|$L90%% | ||
+ | |||
+ | ===General Example #11=== | ||
+ | |||
+ | %%LEVEL 60 AND FLAG X AND FLAG Y AND FLAG Z%% | ||
+ | |||
+ | __Compressed examples:__ | ||
+ | |||
+ | %%LEVEL 60 AND FLAG X AND Y AND Z%% | ||
+ | |||
+ | %%LEVEL 60 AND FLAG X Y Z%% | ||
+ | |||
+ | %%LEVEL 60 FLAG XYZ%% | ||
+ | |||
+ | %%LEVEL60 FLAGXYZ%% | ||
+ | |||
+ | %%$L60 $FXYZ%% | ||
+ | |||
+ | %%60$FXYZ%% | ||
+ | |||
+ | ===General Example #12=== | ||
+ | |||
+ | %%FLAG 2A OR FLAG 2B OR FLAG 4Z%% | ||
+ | |||
+ | This string specifies that the user must have either flag 'A or ' | ||
+ | |||
+ | %%FLAG 2A OR B OR FLAG 4Z%% | ||
+ | |||
+ | If the flag set is not #1, you MUST specify the flag set number when using the FLAG keyword. | ||
+ | |||
+ | __Example: | ||
+ | |||
+ | %%FLAG 2A OR FLAG B OR FLAG 4Z%% | ||
+ | |||
+ | is NOT the same as the first two strings in this example. The second flag (B) would be considered as from flag set #1, since a flag set number was not specified. | ||
+ | |||
+ | __Correct and shortened version:__ | ||
+ | |||
+ | %%FLAG2A|B OR FLAG4Z%% | ||
+ | |||
+ | %%$F2A|B|$F4Z%% | ||
+ | |||
+ | **//Note: Multiple flag sets were developed for advanced sysops who found that the 26 flag limitation (A-Z) was insufficient and requested additional flag capabilities. Most sysops will probably not find it necessary to use more than 26 flags, and therefore have no need for flag sets 2 through 4.//** | ||
+ | |||
+ | ===General Example #13=== | ||
+ | |||
+ | %%NOT FLAG 2G%% | ||
+ | |||
+ | This string specifies that the user most not have flag ' | ||
+ | |||
+ | %%FLAG NOT 2G%% | ||
+ | |||
+ | %%FLAG 2 NOT G%% | ||
+ | |||
+ | __Condensed versions:__ | ||
+ | |||
+ | %%!$F2G%% | ||
+ | |||
+ | %%$F!2G%% | ||
+ | |||
+ | %%$F2!G%% | ||
+ | |||
+ | ===== Nesting Expressions ===== | ||
+ | |||
+ | All of the above string examples have been single expressions that evaluate to either true of false. Sometimes, you may wish to require access to an area using " | ||
+ | |||
+ | __Example: | ||
+ | |||
+ | The above example could be read two ways. | ||
+ | |||
+ | 1: The user must have level 90+, and either the A FLAG or be 21+ years old. | ||
+ | |||
+ | 2: The user must be 21+ years old and have either the A FLAG or level 90+. | ||
+ | |||
+ | To clarify which of the above methods were intended, we use parentheses to separate the two true/false expressions. | ||
+ | |||
+ | 1: %%LEVEL 90 OR (FLAG A AND AGE 21)%% | ||
+ | |||
+ | 2: %%(LEVEL 90 OR FLAG A) AND AGE 21%% | ||
+ | |||
+ | Strings 1 and 2 are interpreted differently and correlate to the above two English logic statements. | ||
+ | |||
+ | Whenever using a combination of AND and OR logic, nested expressions are required. The following string: | ||
+ | |||
+ | %%LEVEL 90 OR FLAG A AND AGE 21%% | ||
+ | |||
+ | is INVALID and would most likely NOT produce the desired results. | ||
+ | |||
+ | Expressions may be nested, using parenthesis, | ||
+ | |||
+ | __Example: | ||
+ | |||
+ | is a VALID string that would evaluate with the following: | ||
+ | |||
+ | * User with level of 80 and age 17 would not qualify | ||
+ | * User with level of 80, flag S and age 17 would not qualify | ||
+ | * User with level of 80 and age 18 would qualify | ||
+ | * User with flag S and age 18 would qualify | ||
+ | * Any user with level 90+ would qualify regardless of age or flags | ||
+ | |||
+ | ==== Nested Logic Examples ==== | ||
+ | |||
+ | ===Nested Example #1=== | ||
+ | |||
+ | %%BPS 9600 OR (BPS 2400 AND TIME NOT 15:00)%% | ||
+ | |||
+ | User must be connected at 9600bps or higher, OR be connected at 2400bps or higher and the time of day being before 3pm. 9600bps and higher callers would always meet this requirement. 2400-7200bps callers will only meet this requirement between 12:00 midnight and 3pm in the afternoon. 1200bps and slower callers would never meet this requirement. | ||
+ | |||
+ | Note, that when nesting expressions, | ||
+ | |||
+ | __Example: | ||
+ | |||
+ | %%BPS 9600 OR (2400 AND TIME NOT 15:00)%% | ||
+ | |||
+ | Is an INVALID string. The 2400 would be interpreted as a LEVEL requirement since it is as the beginning of a new expression and LEVEL is the default parameter type. | ||
+ | |||
+ | The first (correct) string in this example, can of course also be shortened using symbols (and eliminating the AND key word): | ||
+ | |||
+ | %%$B9600|($B2400$T!15)%% | ||
+ | |||
+ | ===Nested Example #2=== | ||
+ | |||
+ | %%(SEX M AND AGE 21) OR (SEX F AND AGE 18)%% | ||
+ | |||
+ | This string specifies that only male users of 21 years and older and female users of 18 and older will meet the requirement. | ||
+ | |||
+ | __Shortened Example:__ | ||
+ | |||
+ | %%($SM$A21)|($SF$A18)%% | ||
+ | |||
+ | The logic of the above string is more verbose than necessary and could be reduced to: | ||
+ | |||
+ | %%AGE 21 OR (SEX F AND AGE 18)%% | ||
+ | |||
+ | producing the same results. | ||
+ | |||
+ | ===Nested Example #3=== | ||
+ | |||
+ | %%(BPS 2400 AND PCR 20) OR LEVEL 90%% | ||
+ | |||
+ | This string would indicate that users of any level will have access if they are connected at 2400bps and have a Post/Call ratio of 20% or higher - OR the users has as least level 90 (sysop). | ||
+ | |||
+ | Utilizing the default parameter type of level, the LEVEL key word can be omitted: | ||
+ | |||
+ | %%(BPS 2400 AND PCR 20) OR 90%% | ||
+ | |||
+ | to create a functionally equivalent, though more confusing, AR string. | ||
+ | |||
+ | A better way to shorten the string would be to eliminate the AND keyword and use symbols: | ||
+ | |||
+ | %%($B 2400 $P 20) | $L 90%% | ||
+ | |||
+ | Eliminating the spaces creates an even more compact string: | ||
+ | |||
+ | %%($B2400$P20)|$L90%% | ||
+ | |||
+ | ===Nested Example #4=== | ||
+ | |||
+ | %%NOT (USER=1 OR USER=20)%% | ||
+ | |||
+ | All users will meet this requirement accept user #1 and user #20. | ||
+ | |||
+ | The above string could also be stated in a non-nested format with the same results: | ||
+ | |||
+ | %%NOT USER=1 AND NOT USER=20%% | ||
+ | |||
+ | though the meaning is not quite as clear, they are functionally the same. | ||
+ | |||
+ | **//Note: The second method requires 2 bytes less in raw logic storage because it is not nested and will be interpreted slightly faster (by a matter of microseconds). Just in case you were wondering...// | ||
+ | |||
+ | ===Nested Example #5=== | ||
+ | |||
+ | %%LEVEL 90 OR (TIME 12:00 AND TIME NOT 18:00)%% | ||
+ | |||
+ | Users with level 90 or higher will always meet this requirement. Users with levels below 90 will only meet this requirement between 12 noon and 6pm. | ||
+ | |||
+ | __Re-arranged: | ||
+ | |||
+ | %%(TIME 12:00 AND TIME NOT 18:00) OR LEVEL 90%% | ||
+ | |||
+ | the string has exactly the same meaning. Eliminating the unnecessary occurrence of the second " | ||
+ | |||
+ | %%(TIME 12:00 AND NOT 18:00) OR LEVEL 90%% | ||
+ | |||
+ | __Maximum compression: | ||
+ | |||
+ | %%($T12!18)|90%% | ||
===== See Also ===== | ===== See Also ===== |