Subversion Repositories wimsdev

Rev

Rev 20 | Rev 228 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. !if $module_language notwordof cn
  3. <center>Access restriction definition</center>
  4. <p>
  5.  
  6. This is multi-line data, executed line by line in their list orders. The
  7. restrictions only affect resource modules, but not administration modules.
  8. Lines starting with a `<tt>#</tt>' are comments.
  9. <p>
  10. Each line is of the format <tt>[access conditions]:[host conditions]</tt>.
  11. <p>
  12. the access conditions is a list of words, which will be ANDed. The available
  13. words are listed in the following table. Each word can be prefexed with
  14. <tt>non</tt> to reverse its logical meaning.
  15. <p><center><table border=2>
  16. <tr><th>word<th>meaning
  17. <tr><td>class<td>The connection is within a virtual class.
  18. <tr><td>com<td>The requested module is under the com/ subtree.
  19. <tr><td>document<td>The requested module is a document. (not yet available)
  20. <tr><td>exercise<td>The requested module is an exercise.
  21. <tr><td>hint<td>The request is for hint.
  22. <tr><td>local<td>The requested module is under the local/ subtree.
  23. <tr><td>recreation<td>The requested module is a recreation.
  24. <tr><td>tool<td>The requested module is a tool.
  25. </table></center> <p>
  26.  
  27. The host conditions can be any host definition, eventually plus time
  28. definition as for any worksheets. If the first character of the host
  29. conditions is ``<tt>!</tt>'', then the host/time meeting the conditions will
  30. be refused access (for the resources meeting the access conditions).
  31. Otherwise they will be granted access, and subsequent lines in the
  32. restriction definition will be ignored for those meeting the conditions.
  33.  
  34. <p><hr> <p>
  35.  
  36. !read help/hosts.phtml
  37.  
  38. <p><hr> <p>
  39.  
  40. Some starting examples.
  41. <p>
  42. # Disallow the use of tools from 134.59.102.*
  43. <br><tt>tool:! 134.59.102.</tt>
  44. <p>
  45. # Disallow calls for hint from localhost.
  46. <br><tt>hint:! 127.0.0.1</tt>
  47. <p>
  48. # People from wanadoo.fr cannot have anonymous accesses for recreations.
  49. <br><tt>recreation nonclass:! .wanadoo.fr</tt>
  50. <p>
  51. # Work in virtual classes prohibited from localhost on New Year's Day of 2004.
  52. <br><tt>class: ! 127.0.0.1 >20040101.00:00 <20040101.23:59</tt>
  53. <p>
  54. !endif
  55.  
  56. !if $module_language=cn
  57. <center>ÏÞÖÆ½øÈëµÄ¶¨Òå</center>
  58. <p>
  59.  
  60. ÕâÊÇÖðÐÐÖ´ÐеĶàÐÐÊý¾Ý.
  61. ÆäÏÞÖÆ½ö¶Ô×ÊÔ´Ä£¿éÓÐЧ, ²»Ó°Ïì¹ÜÀíÄ£¿é.
  62. ÒÔ `<tt>#</tt>' ÆðÊ×µÄÐÐÊÇ×¢½â.
  63. <p>
  64. ÿһÐеĸñʽÊÇ <tt>[½øÈëÌõ¼þ]:[Ö÷»úÌõ¼þ]</tt>.
  65. <p>
  66. ½øÈëÌõ¼þÊÇ¿ÉÓà AND Á¬½ÓµÄÒ»´®´Ê. ¿ÉÓõĴʼûϱí, ÿ¸ö´Ê¾ù¿ÉÌí¼Óǰ׺
  67. <tt>non</tt> ±íʾ·ñ¶¨.
  68. <p><center><table border=2>
  69. <tr><th>´Ê<th>ÒâÒå
  70. <tr><td>class<td>Á¬½ÓÏÞÓÚÐéÄâ°àÄÚ.
  71. <tr><td>com<td>±»ÇëÇóµÄÄ£¿éλÓÚ com/ ×ÓÊ÷ÏÂ.
  72. <tr><td>document<td>±»ÇëÇóµÄÄ£¿éÊÇÎļþ. (ĿǰÉв»¿ÉÓÃ)
  73. <tr><td>exercise<td>±»ÇëÇóµÄÄ£¿éÊÇÁ·Ï°.
  74. <tr><td>hint<td>ÇëÇóÄ¿µÄÊÇΪÁËÌáʾ.
  75. <tr><td>local<td>±»ÇëÇóµÄÄ£¿éλÓÚ local/ ×ÓÊ÷ÏÂ.
  76. <tr><td>recreation<td>±»ÇëÇóµÄÄ£¿éÊÇÓÎÏ·.
  77. <tr><td>tool<td>±»ÇëÇóµÄÄ£¿éÊǹ¤¾ß.
  78. </table></center> <p>
  79.  
  80. Ö÷»úÌõ¼þ¿ÉÒÔÊǸ÷ÖÖÐÎʽµÄÖ÷»ú¶¨Òå,±ØÒªÊ±¿ÉÒÔ¼ÓÉÏʱ¼äÏÞÖÆ.
  81. Èç¹ûÖ÷»úÌõ¼þµÄµÚÒ»¸ö×Ö·ûÊÇ ``<tt>!</tt>'',
  82. ÄÇôÂú×ãÌõ¼þµÄÖ÷»ú/ʱ¼ä¾ù±»¾Ü¾ø½øÈë(Âú×ã½øÈëÌõ¼þµÄ×ÊÔ´).
  83. ·ñÔòÄÇЩÖ÷»ú¾ÍÓÐȨ½øÈë, ¶øÒÔºóµÄ¸÷Ðоù±»ºöÂÔ²»¼Æ.
  84.  
  85. <p><hr> <p>
  86.  
  87. !read help/hosts.phtml
  88.  
  89. <p><hr> <p>
  90.  
  91. һЩÀý×Ó.
  92. <p>
  93. # ²»ÔÊÐíÀ´×Ô 134.59.102.* µÄ»úÆ÷½øÈ빤¾ß.
  94. <br><tt>tool:! 134.59.102.</tt>
  95. <p>
  96. # ²»ÔÊÐí localhost ÇëÇóÌáʾ.
  97. <br><tt>hint:! 127.0.0.1</tt>
  98. <p>
  99. # À´×Ô wanadoo.fr ²»ÄÜÄäÃû½øÈëÓÎÏ·.
  100. <br><tt>recreation nonclass:! .wanadoo.fr</tt>
  101. <p>
  102. #  localhost ²»ÄÜÔÚ2004ÐÂÄê½øÈëÐéÄâ°à.
  103. <br><tt>class: ! 127.0.0.1 >20040101.00:00 <20040101.23:59</tt>
  104. <p>
  105. !endif
  106.