File: modclass

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (70 lines) | stat: -rw-r--r-- 1,832 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Add a subclass under the current superclass.
# Calling parameter: subclass address under the superclass.

!if $wims_superclass=$empty or $wims_user!=supervisor or $wims_read_parm=$empty
  !exit
!endif

classdir=wimshome/log/classes/$wims_superclass
userdir=$classdir/.users
s_=$sup

!if $pass!=$empty
  pass=!text select $char_passwd in $pass
  passlen=!charcnt $pass
  !if $passlen<$passwd_min or $passlen>$passwd_max or $pass != $pass2
    error=bad_password
    !exit
  !endif
!else
  pass=!defof class_password in $classdir/$wims_read_parm/.def
!endif

!if $passs!=$empty
  passs=!text select $char_passwd in $passs
  passlen=!charcnt $passs
  !if $passlen<$passwd_min or $passlen>$passwd_max or $passs != $passs2
    error=bad_password
    !exit
  !endif
!else
  passs=!defof user_password in $classdir/$wims_read_parm/supervisor
!endif

1=!defof user_exists in $userdir/$s_
2=!defof class_defined in $classdir/$wims_read_parm/.def
!if $2!=yes
  error=mod_not_exist
  !exit
!endif
!if $1!=yes
  s_=supervisor
!else
  1=!defof user_supervisable in $userdir/$s_
  !if $1!=yes
    name=$s_
    error=not_supervisable
    !exit
  !endif
!endif
!read adm/class/userdef classes,$wims_superclass,$s_
cadd_Supervisor=$s_
tmp=!defof user_firstname,user_lastname,user_email in $userdef
!distribute item $tmp into sadd_firstname,sadd_lastname,sadd_email,sadd_password
cadd_email=$sadd_email
cadd_password=$pass
sadd_password=$passs
modclass_slist=!listunion firstname,lastname,email and $modclass_slist

!read adm/gateway/delsup $wims_read_parm
!if $s_!=supervisor
  suplist=!defof user_supervise in $userdir/$s_
  suplist=!listunion $suplist and $wims_superclass/$wims_read_parm
  !setdef !set user_supervise=$suplist in $userdir/$s_
!endif

!read adm/class/modclass $wims_superclass/$wims_read_parm

!if $error!=$empty
  !exit
!endif