Rev 4640 | Rev 9909 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3261 | obado | 1 | qclass=!translate internal ./,;?* to $ $ in $qclass |
23 | reyssat | 2 | !if $ $ isin $qclass |
4561 | obado | 3 | error=wrong class id ($qclass) |
4118 | obado | 4 | !exit |
23 | reyssat | 5 | !endif |
6 | |||
7 | !if $qclass=$empty or $rclass=$empty |
||
6514 | obado | 8 | error=undefined local and/or remote class |
23 | reyssat | 9 | !exit |
10 | !endif |
||
11 | |||
4118 | obado | 12 | !if _ isin $qclass |
13 | qclass=!translate internal _ to , in $qclass |
||
14 | nb=!itemcnt $qclass |
||
15 | |||
16 | # the recursivity down here only works for 2 levels |
||
17 | !if $nb>2 |
||
18 | error=too many subdivisions in class id ($nb) |
||
19 | !exit |
||
20 | !endif |
||
21 | |||
22 | subclassid=!item 2 of $qclass |
||
23 | qclass = !item 1 of $qclass |
||
24 | |||
25 | |||
26 | !read scripts/check.class |
||
27 | !if $error!=$empty |
||
28 | !exit |
||
29 | !endif |
||
30 | |||
4176 | obado | 31 | class_type=!defof class_type in $classdeffile |
32 | !if $class_type != 2 |
||
4118 | obado | 33 | error=sorry, there shouldn't be a subclass in a simple class |
34 | !exit |
||
35 | !endif |
||
36 | |||
37 | qclass = $qclass/$subclassid |
||
38 | |||
39 | !endif |
||
40 | |||
41 | |||
23 | reyssat | 42 | classdeffile=wimshome/log/classes/$qclass/.def |
391 | obado | 43 | classexofile=wimshome/log/classes/$qclass/.defs |
44 | |||
23 | reyssat | 45 | test=!defof class_defined in $classdeffile |
46 | !if $test!=yes |
||
4118 | obado | 47 | error=class $qclass not existing |
48 | !exit |
||
23 | reyssat | 49 | !endif |
4118 | obado | 50 | |
23 | reyssat | 51 | test=!defof class_connections in $classdeffile |
52 | test=!items2words $test |
||
53 | test1=!translate internal +,; to $ $ in $test |
||
54 | !if $ident/$rclass notwordof $test1 |
||
4118 | obado | 55 | error=connection refused by requested class ($qclass) |
23 | reyssat | 56 | !exit |
57 | !endif |
||
58 | |||
1373 | bpr | 59 | !if $job iswordof modclass delclass adduser moduser deluser recuser \ |
60 | putcsv update and\ |
||
61 | ($ident/$rclass+ notwordof $test and +$ident/$rclass+ notwordof $test) |
||
62 | error=modification of class not allowed |
||
63 | !exit |
||
64 | !endif |
||
391 | obado | 65 | |
3261 | obado | 66 | ############ Tests : A quoi servent les "+" ? ################### |
67 | ##ces plus sont rajoutés quand il y a des droits d'une classe sur l'autre. (BPR) |
||
1373 | bpr | 68 | !!#une classe créée à travers le module raw : il y a un + à la fin dans class_connections |
3261 | obado | 69 | ## A quoi correspondent chacun de ces test ? (OB) |
1373 | bpr | 70 | |
71 | !!# si l'on crée une classe en ajoutant une connection |
||
72 | !!# no no |
||
73 | !!# dans la classe créée myself/2534808+ |
||
74 | !!# dans la classe local yourself/7020853 |
||
75 | |||
76 | !!# yes no |
||
77 | !!# myself/2534808+ |
||
78 | !!# +yourself/6114403 |
||
79 | |||
80 | !!# no yes |
||
81 | !!# myself/2534808# |
||
3261 | obado | 82 | !!# yourself/4729460+ |
1373 | bpr | 83 | |
84 | !!# yes yes |
||
85 | !!# myself/2534808+ |
||
86 | !!# +yourself/1446641+ |
||
3261 | obado | 87 | ######################## FIN des tests |
1373 | bpr | 88 | |
23 | reyssat | 89 | wims_class=$qclass |
3261 | obado | 90 | wims_class_dir=$wims_home/log/classes/$qclass |