Subversion Repositories wimsdev

Rev

Rev 17879 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17879 Rev 18277
Line 164... Line 164...
164
void access_check(int isclass)
164
void access_check(int isclass)
165
{
165
{
166
  char *p, *p1, *p2, *p3, *pp1, *pp2;
166
  char *p, *p1, *p2, *p3, *pp1, *pp2;
167
  char msg[200], *name="";
167
  char msg[200], *name="";
168
  char cbuf[MAX_LINELEN+1];
168
  char cbuf[MAX_LINELEN+1];
-
 
169
  char* nonstr[]={"","non"};
169
  long int thisaccess, lineaccess, linepol, thispol;
170
  long int thisaccess, lineaccess, linepol, thispol;
170
  int non, refuse;
171
  int non, refuse;
171
 
172
 
172
  if(manageable>=2 || robot_access) return;
173
  if(manageable>=2 || robot_access) return;
173
  thisaccess=0;
174
  thisaccess=0;
Line 238... Line 239...
238
      if(thispol==0) continue;
239
      if(thispol==0) continue;
239
      if(non) lineaccess^=thispol;
240
      if(non) lineaccess^=thispol;
240
      linepol|=thispol;
241
      linepol|=thispol;
241
    }
242
    }
242
    if(linepol==0 || (linepol&lineaccess)!=linepol) continue;
243
    if(linepol==0 || (linepol&lineaccess)!=linepol) continue;
243
    snprintf(msg,200,"no_access_class %s",name);
244
    snprintf(msg,200,"no_access_class %s %s",name,nonstr[non]);
244
    if(refuse)
245
    if(refuse)
245
      if (isclass) user_error(msg); else user_error("no_access");
246
      if (isclass) user_error(msg); else user_error("no_access");
246
    else return;
247
    else return;
247
  }
248
  }
248
  /* end of limited access */
249
  /* end of limited access */