Rev 17880 | 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> |
18036 | bpr | 10 | The access conditions are a list of words, which will be ANDed. The available |
228 | reyssat | 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> |
||
17878 | czzmrn | 24 | $table_tr<td class="tt wims_code_words">freework</td><td>The requested module is a freework.</td></tr> |
2461 | bpr | 25 | $table_end |
20 | reyssat | 26 | |
15416 | bpr | 27 | !set date=!char 1 to 8 of $wims_now |
28 | !set year=!char 1 to 4 of $wims_now |
||
29 | <div> |
||
30 | The host/time conditions can be any host or time definition as for any worksheet. |
||
31 | According to the first line with host/time meeting the host/time conditions: |
||
32 | <ul><li> If the first character of the host/time conditions is |
||
33 | <span class="tt wims_code_words">!</span>, the resources meeting the access conditions |
||
34 | will be refused access. |
||
35 | </li><li> |
||
36 | Otherwise they will be granted access. |
||
37 | </li></ul> |
||
38 | Subsequent lines in the restriction definition will be then ignored. |
||
39 | </div> |
||
17177 | bpr | 40 | <hr> |
20 | reyssat | 41 | |
42 | !read help/hosts.phtml |
||
43 | |||
17177 | bpr | 44 | <hr> |
20 | reyssat | 45 | |
46 | Some starting examples. |
||
15416 | bpr | 47 | <div> |
20 | reyssat | 48 | # Disallow the use of tools from 134.59.102.* |
15416 | bpr | 49 | <pre> |
50 | <span class="tt wims_code_words">tool:! 134.59.102.</span> |
||
51 | </pre></div><div> |
||
20 | reyssat | 52 | # Disallow calls for hint from localhost. |
15416 | bpr | 53 | <pre> |
54 | <span class="tt wims_code_words">hint:! 127.0.0.1</span> |
||
55 | </pre></div><div> |
||
20 | reyssat | 56 | # People from wanadoo.fr cannot have anonymous accesses for recreations. |
15416 | bpr | 57 | <pre> |
58 | <span class="tt wims_code_words">nonclass recreation:! .wanadoo.fr</span> |
||
59 | </pre></div><div> |
||
60 | # Work in the virtual class prohibited from localhost on New Year's Day of 2004. |
||
61 | <pre> |
||
62 | <span class="tt wims_code_words">class:! 127.0.0.1 >$(year)0101.00:00 <$(year)0101.23:59</span> |
||
63 | </pre></div><div> |
||
64 | # Work in the virtual class prohibited from 10pm to 6am on the days of October. |
||
65 | <pre> |
||
66 | <span class="tt wims_code_words">class:! >****10**.22:00 <****10**.23:59</span> |
||
67 | <span class="tt wims_code_words">class:! >****10**.00:00 <****10**.06:00</span> |
||
68 | </pre> |
||
17878 | czzmrn | 69 | # Work on any activity which is not freework is phohibited from all the network. |
70 | <pre> |
||
17880 | czzmrn | 71 | <span class="tt wims_code_words">nonfreework:!all</span> |
17878 | czzmrn | 72 | </pre> |
15416 | bpr | 73 | </div> |