Rev 10778 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10778 | Rev 12957 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | # check.class verifie l'existence de la classe qclass |
|
- | 2 | ||
- | 3 | initial_qclass=$qclass |
|
1 | qclass=!translate internal ./,;?* to $ $ in $qclass |
4 | qclass=!translate internal ./,;?* to $ $ in $qclass |
2 | !if $ $ isin $qclass |
5 | !if $ $ isin $qclass |
3 | error=wrong class |
6 | error=wrong class idX ($qclass) |
4 | !exit |
7 | !exit |
5 | !endif |
8 | !endif |
6 | 9 | ||
7 | !if $qclass=$empty or $rclass=$empty |
10 | !if $qclass=$empty or $rclass=$empty |
8 |
|
11 | error=undefined local and/or remote class (qclass=$qclass | rclass=$rclass | initial_qclass=$initial_qclass) |
9 | !exit |
12 | !exit |
10 | !endif |
13 | !endif |
11 | 14 | ||
12 | !if _ isin $qclass |
15 | !if _ isin $qclass |
13 | qclass=!translate internal _ to , in $qclass |
16 | qclass=!translate internal _ to , in $qclass |
14 | nb=!itemcnt $qclass |
- | |
15 | 17 | ||
16 | # the recursivity down here only works for 2 levels |
- | |
17 | !if $nb>2 |
- | |
18 |
|
18 | subsubclassid=!item 3 of $qclass |
19 | !exit |
- | |
20 | !endif |
- | |
21 | - | ||
22 | subclassid=!item 2 of $qclass |
19 | subclassid=!item 2 of $qclass |
23 | qclass = !item 1 of $qclass |
20 | qclass = !item 1 of $qclass |
24 | 21 | ||
25 | !read scripts/check.class |
22 | !read scripts/check.class |
26 | !if $error!=$empty |
23 | !if $error!=$empty |
27 | !exit |
24 | !exit |
28 | !endif |
25 | !endif |
29 | 26 | ||
30 | class_type=!defof class_type in $classdeffile |
27 | class_type=!defof class_type in $classdeffile |
31 | !if $class_type |
28 | !if $class_type notitemof 2,4 |
32 |
|
29 | error=sorry, there shouldn't be a subclass in a simple class |
33 |
|
30 | !exit |
34 | !endif |
31 | !endif |
35 | 32 | ||
36 | qclass = $qclass/$subclassid |
33 | qclass = $qclass/$subclassid |
- | 34 | !if $subsubclassid!=$empty and $class_type=4 |
|
- | 35 | qclass = $qclass/$subsubclassid |
|
- | 36 | !endif |
|
37 | 37 | ||
38 | !endif |
38 | !endif |
39 | 39 | ||
40 | 40 | ||
41 | classdeffile=wimshome/log/classes/$qclass/.def |
41 | classdeffile=wimshome/log/classes/$qclass/.def |
Line 49... | Line 49... | ||
49 | 49 | ||
50 | test=!defof class_connections in $classdeffile |
50 | test=!defof class_connections in $classdeffile |
51 | test=!items2words $test |
51 | test=!items2words $test |
52 | test1=!translate internal +,; to $ $ in $test |
52 | test1=!translate internal +,; to $ $ in $test |
53 | !if $ident/$rclass notwordof $test1 |
53 | !if $ident/$rclass notwordof $test1 |
54 | error=connection refused by requested class ($qclass) |
54 | error=connection refused by requested class ($qclass) ($ident/$rclass) |
55 | !exit |
55 | !exit |
56 | !endif |
56 | !endif |
57 | 57 | ||
58 | !if $job iswordof modclass delclass adduser moduser deluser recuser \ |
58 | !if $job iswordof modclass delclass adduser moduser deluser recuser \ |
59 |
|
59 | putcsv update and\ |
60 |
|
60 | ($ident/$rclass+ notwordof $test and +$ident/$rclass+ notwordof $test) |
61 | error=modification of class not allowed |
61 | error=modification of class not allowed |
62 | !exit |
62 | !exit |
63 | !endif |
63 | !endif |
- | 64 | ||
64 | 65 | ||
65 | ############ Tests : A quoi servent les "+" ? ################### |
66 | ############ Tests : A quoi servent les "+" ? ################### |
66 | ##ces plus sont rajoutés quand il y a des droits d'une classe sur l'autre. (BPR) |
67 | ##ces plus sont rajoutés quand il y a des droits d'une classe sur l'autre. (BPR) |
67 | !!#une classe créée à travers le module raw : il y a un + à la fin dans class_connections |
68 | !!#une classe créée à travers le module raw : il y a un + à la fin dans class_connections |
68 | ## A quoi correspondent chacun de ces test ? (OB) |
69 | ## A quoi correspondent chacun de ces test ? (OB) |