Subversion Repositories wimsdev

Rev

Rev 13460 | Rev 15818 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13460 Rev 14335
Line 16... Line 16...
16
option=!words2items $option
16
option=!words2items $option
17
code=!word 1 of $code
17
code=!word 1 of $code
18
 
18
 
19
 
19
 
20
!if $job notin $allowed_jobs_without_auth or $ident != $empty
20
!if $job notin $allowed_jobs_without_auth or $ident != $empty
21
	# le script autchars permet de definir les listes de caracteres alphanumeriques et de ponctuation
21
  # le script autchars permet de definir les listes de caracteres alphanumeriques et de ponctuation
22
	# il definit egalement la fourchette de longueur autorise des login/mdp
22
  # il definit egalement la fourchette de longueur autorise des login/mdp
23
	!read adm/class/authchars
23
  !read adm/class/authchars
24
	# Le script var.check verifie l'authentification de l'utilisateur
24
  # Le script var.check verifie l'authentification de l'utilisateur
25
	!read var.check
25
  !read var.check
26
!endif
26
!endif
27
 
27
 
28
!if $job isin $allowed_jobs_without_auth
28
!if $job isin $allowed_jobs_without_auth
29
  !default ident_type=json
29
  !default ident_type=json
30
!endif
30
!endif
Line 40... Line 40...
40
 !changeto error.proc $error
40
 !changeto error.proc $error
41
!endif
41
!endif
42
 
42
 
43
!if $code=$empty
43
!if $code=$empty
44
  !if $ident_type notwordof $notplaintext
44
  !if $ident_type notwordof $notplaintext
45
	ok=OK
45
  ok=OK
46
  !else
46
  !else
47
  	!if $ident_type=xmlformat
47
    !if $ident_type=xmlformat
48
  	  	ok=<params><param><value><string>OK</string></value></param>
48
      ok=<params><param><value><string>OK</string></value></param>
49
  	!endif
49
    !endif
50
  	!if $ident_type=json
50
    !if $ident_type=json
51
  	  	ok={"status" : "OK"
51
      ok={"status" : "OK"
52
  	!endif
52
    !endif
53
  !endif
53
  !endif
54
!else
54
!else
55
  !if $ident_type notwordof $notplaintext
55
  !if $ident_type notwordof $notplaintext
56
	ok=OK $code
56
  ok=OK $code
57
  !else
57
  !else
58
  	!if $ident_type=xmlformat
58
    !if $ident_type=xmlformat
59
  	 ok=<params><param><value><struct>\
59
  	  ok=<params><param><value><struct>\
60
  	 <member>\
60
  	  <member>\
61
	 	<name>code</name>\
61
	 	  <name>code</name>\
62
	 	<value><string>$code</string></value>\
62
	 	  <value><string>$code</string></value>\
63
	 </member>\
63
	   </member>\
64
 
64
 
65
	!endif
65
    !endif
66
	!if $ident_type=json
66
    !if $ident_type=json
67
  	  	ok={"status" : "OK","code":"$code"
67
      ok={"status" : "OK","code":"$code"
68
  	!endif
68
  	!endif
69
  !endif
69
  !endif
70
!endif
70
!endif
71
 
71
 
72
!if $job isitemof $allowed_file_jobs
72
!if $job isitemof $allowed_file_jobs
73
 !if $job isitemof getclasstgz,getibookwidget
73
  !if $job isitemof getclasstgz,getibookwidget
74
 	!shortout $header_zip\
74
    !shortout $header_zip\
75
Content-Disposition: attachment; filename=$given_fname;\
75
Content-Disposition: attachment; filename=$given_fname;\
76
\
76
\
77
 
77
 
78
 
78
 
79
 !else
79
  !else
80
 	!shortout $header\
80
    !shortout $header\
81
 
81
 
82
 !endif
82
 !endif
83
 
83
 
84
 !sh cat $wims_home/$fname
84
  !sh cat $wims_home/$fname
85
 
85
 
86
 !exit
86
  !exit
87
!endif
87
!endif
88
 
-
 
89
 
88
 
90
!if $ident_type notwordof $notplaintext
89
!if $ident_type notwordof $notplaintext
91
	!shortout $header\
90
	!shortout $header\
92
 
91
 
93
!else
92
!else
94
 !if $ident_type iswordof xmlformat
93
  !if $ident_type iswordof xmlformat
95
	!shortout $header_xml\
94
	  !shortout $header_xml\
96
<?xml version="1.0" encoding="$encoding"?>\
95
<?xml version="1.0" encoding="$encoding"?>\
97
<!DOCTYPE methodResponse PUBLIC "XML9-RPC" "http://ticewims.unice.fr/xml-rpc/xml-rpc.dtd">\
96
<!DOCTYPE methodResponse PUBLIC "XML9-RPC" "http://ticewims.unice.fr/xml-rpc/xml-rpc.dtd">\
98
<methodResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ticewims.unice.fr/xml-rpc/xml-rpc.xsd">\
97
<methodResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ticewims.unice.fr/xml-rpc/xml-rpc.xsd">\
99
 
98
 
100
 !endif
99
  !endif
101
 !if $ident_type=json
100
  !if $ident_type=json
102
 	!shortout $header_json\
101
 	  !shortout $header_json\
103
 
102
 
104
 !endif
103
  !endif
105
 
104
 
106
!endif
105
!endif
107
 
106
 
108
!if $job isitemof $allowed_actions_jobs
107
!if $job isitemof $allowed_actions_jobs
109
 !shortout $ok\
108
  !shortout $ok\
110
 
109
 
111
 !read types/$ident_type
110
  !read types/$ident_type
112
!endif
111
!endif
113
 
112
 
114
!if $job notwordof authuser getsession
113
!if $job notwordof authuser getsession
115
 wims_mode=popup
114
   wims_mode=popup
116
!endif
115
!endif
117
 
116
 
118
wims_module_log=$job $ident -> $qclass $quser
117
wims_module_log=$job $ident -> $qclass $quser