Rev 6514 | Rev 10778 | 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) |
||
9909 | obado | 19 | !exit |
4118 | obado | 20 | !endif |
9909 | obado | 21 | |
4118 | obado | 22 | subclassid=!item 2 of $qclass |
23 | qclass = !item 1 of $qclass |
||
9909 | obado | 24 | |
4118 | obado | 25 | !read scripts/check.class |
26 | !if $error!=$empty |
||
27 | !exit |
||
28 | !endif |
||
9909 | obado | 29 | |
4176 | obado | 30 | class_type=!defof class_type in $classdeffile |
31 | !if $class_type != 2 |
||
4118 | obado | 32 | error=sorry, there shouldn't be a subclass in a simple class |
33 | !exit |
||
34 | !endif |
||
9909 | obado | 35 | |
4118 | obado | 36 | qclass = $qclass/$subclassid |
37 | |||
38 | !endif |
||
39 | |||
40 | |||
23 | reyssat | 41 | classdeffile=wimshome/log/classes/$qclass/.def |
391 | obado | 42 | classexofile=wimshome/log/classes/$qclass/.defs |
43 | |||
23 | reyssat | 44 | test=!defof class_defined in $classdeffile |
45 | !if $test!=yes |
||
4118 | obado | 46 | error=class $qclass not existing |
47 | !exit |
||
23 | reyssat | 48 | !endif |
4118 | obado | 49 | |
23 | reyssat | 50 | test=!defof class_connections in $classdeffile |
51 | test=!items2words $test |
||
52 | test1=!translate internal +,; to $ $ in $test |
||
53 | !if $ident/$rclass notwordof $test1 |
||
4118 | obado | 54 | error=connection refused by requested class ($qclass) |
23 | reyssat | 55 | !exit |
56 | !endif |
||
57 | |||
1373 | bpr | 58 | !if $job iswordof modclass delclass adduser moduser deluser recuser \ |
59 | putcsv update and\ |
||
60 | ($ident/$rclass+ notwordof $test and +$ident/$rclass+ notwordof $test) |
||
61 | error=modification of class not allowed |
||
62 | !exit |
||
63 | !endif |
||
391 | obado | 64 | |
3261 | obado | 65 | ############ Tests : A quoi servent les "+" ? ################### |
66 | ##ces plus sont rajoutés quand il y a des droits d'une classe sur l'autre. (BPR) |
||
1373 | bpr | 67 | !!#une classe créée à travers le module raw : il y a un + à la fin dans class_connections |
3261 | obado | 68 | ## A quoi correspondent chacun de ces test ? (OB) |
1373 | bpr | 69 | |
9909 | obado | 70 | !!# si l'on crée une classe en ajoutant une connection |
1373 | bpr | 71 | !!# no no |
72 | !!# dans la classe créée myself/2534808+ |
||
73 | !!# dans la classe local yourself/7020853 |
||
74 | |||
75 | !!# yes no |
||
76 | !!# myself/2534808+ |
||
77 | !!# +yourself/6114403 |
||
78 | |||
79 | !!# no yes |
||
80 | !!# myself/2534808# |
||
3261 | obado | 81 | !!# yourself/4729460+ |
1373 | bpr | 82 | |
83 | !!# yes yes |
||
84 | !!# myself/2534808+ |
||
85 | !!# +yourself/1446641+ |
||
3261 | obado | 86 | ######################## FIN des tests |
1373 | bpr | 87 | |
23 | reyssat | 88 | wims_class=$qclass |
3261 | obado | 89 | wims_class_dir=$wims_home/log/classes/$qclass |