Rev 15416 | Rev 17878 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
15416 | bpr | 1 | <h2 class="wimscenter">Access restriction definition</h2> |
20 | reyssat | 2 | |
3 | <p> |
||
4 | This is multi-line data, executed line by line in their list orders. The |
||
5 | restrictions only affect resource modules, but not administration modules. |
||
15416 | bpr | 6 | Lines starting with a `<span class="tt wims_code_words">#</span>' are comments. |
5947 | bpr | 7 | </p><p> |
15416 | bpr | 8 | Each line is of the format <span class="tt wims_code_words">access conditions:host/time conditions</span>. |
5947 | bpr | 9 | </p><p> |
228 | reyssat | 10 | The access conditions is a list of words, which will be ANDed. The available |
11 | words are listed in the following table. Each word can be prefixed with |
||
5903 | bpr | 12 | <span class="tt wims_code_words">non</span> to reverse its logical meaning. |
5947 | bpr | 13 | </p> |
2461 | bpr | 14 | $table_header |
3953 | bpr | 15 | $table_tr<th>word</th><th>meaning</th></tr> |
6249 | bpr | 16 | $table_tr<td class="tt wims_code_words">class</td><td>The connection is within a virtual class.</td></tr> |
17 | $table_tr<td class="tt wims_code_words">com</td><td>The requested module is under the com/ subtree.</td></tr> |
||
15416 | bpr | 18 | $table_tr<td class="tt wims_code_words">document</td><td>The requested module is a document.</td></tr> |
6249 | bpr | 19 | $table_tr<td class="tt wims_code_words">exercise</td><td>The requested module is an exercise.</td></tr> |
20 | $table_tr<td class="tt wims_code_words">hint</td><td>The request is for hint.</td></tr> |
||
21 | $table_tr<td class="tt wims_code_words">local</td><td>The requested module is under the local/ subtree.</td></tr> |
||
22 | $table_tr<td class="tt wims_code_words">recreation</td><td>The requested module is a recreation.</td></tr> |
||
23 | $table_tr<td class="tt wims_code_words">tool</td><td>The requested module is a tool.</td></tr> |
||
2461 | bpr | 24 | $table_end |
20 | reyssat | 25 | |
15416 | bpr | 26 | !set date=!char 1 to 8 of $wims_now |
27 | !set year=!char 1 to 4 of $wims_now |
||
28 | <div> |
||
29 | The host/time conditions can be any host or time definition as for any worksheet. |
||
30 | According to the first line with host/time meeting the host/time conditions: |
||
31 | <ul><li> If the first character of the host/time conditions is |
||
32 | <span class="tt wims_code_words">!</span>, the resources meeting the access conditions |
||
33 | will be refused access. |
||
34 | </li><li> |
||
35 | Otherwise they will be granted access. |
||
36 | </li></ul> |
||
37 | Subsequent lines in the restriction definition will be then ignored. |
||
38 | </div> |
||
17177 | bpr | 39 | <hr> |
20 | reyssat | 40 | |
41 | !read help/hosts.phtml |
||
42 | |||
17177 | bpr | 43 | <hr> |
20 | reyssat | 44 | |
45 | Some starting examples. |
||
15416 | bpr | 46 | <div> |
20 | reyssat | 47 | # Disallow the use of tools from 134.59.102.* |
15416 | bpr | 48 | <pre> |
49 | <span class="tt wims_code_words">tool:! 134.59.102.</span> |
||
50 | </pre></div><div> |
||
20 | reyssat | 51 | # Disallow calls for hint from localhost. |
15416 | bpr | 52 | <pre> |
53 | <span class="tt wims_code_words">hint:! 127.0.0.1</span> |
||
54 | </pre></div><div> |
||
20 | reyssat | 55 | # People from wanadoo.fr cannot have anonymous accesses for recreations. |
15416 | bpr | 56 | <pre> |
57 | <span class="tt wims_code_words">nonclass recreation:! .wanadoo.fr</span> |
||
58 | </pre></div><div> |
||
59 | # Work in the virtual class prohibited from localhost on New Year's Day of 2004. |
||
60 | <pre> |
||
61 | <span class="tt wims_code_words">class:! 127.0.0.1 >$(year)0101.00:00 <$(year)0101.23:59</span> |
||
62 | </pre></div><div> |
||
63 | # Work in the virtual class prohibited from 10pm to 6am on the days of October. |
||
64 | <pre> |
||
65 | <span class="tt wims_code_words">class:! >****10**.22:00 <****10**.23:59</span> |
||
66 | <span class="tt wims_code_words">class:! >****10**.00:00 <****10**.06:00</span> |
||
67 | </pre> |
||
68 | </div> |