Rev 15411 | Rev 15874 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15411 | Rev 15414 | ||
---|---|---|---|
Line 157... | Line 157... | ||
157 | #define ac_com 0x40 /* access to commercial modules */ |
157 | #define ac_com 0x40 /* access to commercial modules */ |
158 | #define ac_hint 0x80 /* hint command */ |
158 | #define ac_hint 0x80 /* hint command */ |
159 | #define ac_sheet 0x100/* use within a worksheet */ |
159 | #define ac_sheet 0x100/* use within a worksheet */ |
160 | #define ac_exam 0x200/* work during an exam */ |
160 | #define ac_exam 0x200/* work during an exam */ |
161 | 161 | ||
162 | /* Check |
162 | /* Check site or class access policy. */ |
163 | void access_check(int isclass) |
163 | void access_check(int isclass) |
164 | { |
164 | { |
165 | char *p, *p1, *p2, *p3, *pp1, *pp2; |
165 | char *p, *p1, *p2, *p3, *pp1, *pp2; |
166 | char cbuf[MAX_LINELEN+1]; |
166 | char cbuf[MAX_LINELEN+1]; |
167 | long int thisaccess, lineaccess, linepol, thispol; |
167 | long int thisaccess, lineaccess, linepol, thispol; |
Line 183... | Line 183... | ||
183 | if(class_dir[0]==0) return; |
183 | if(class_dir[0]==0) return; |
184 | accessfile(cbuf,"r","%s/access.conf",class_dir); |
184 | accessfile(cbuf,"r","%s/access.conf",class_dir); |
185 | } |
185 | } |
186 | else accessfile(cbuf,"r",ACCESS_CONF); |
186 | else accessfile(cbuf,"r",ACCESS_CONF); |
187 | if(cbuf[0]==0) return; |
187 | if(cbuf[0]==0) return; |
188 |
|
188 | /* access limited */ |
189 | if(cmd_type==cmd_hint) thisaccess|=ac_hint; |
189 | if(cmd_type==cmd_hint) thisaccess|=ac_hint; |
190 | p1=getvar("wims_accessright"); if(p1!=NULL && *p1!=0) { |
190 | p1=getvar("wims_accessright"); if(p1!=NULL && *p1!=0) { |
191 | p=getvar(ro_name[ro_module]); |
191 | p=getvar(ro_name[ro_module]); |
192 | for(p1=find_word_start(p1);*p1; p1=find_word_start(p2)) { |
192 | for(p1=find_word_start(p1);*p1; p1=find_word_start(p2)) { |
193 | p2=find_word_end(p1); |
193 | p2=find_word_end(p1); |