Branch: Tag:

2001-03-15

2001-03-15 23:31:26 by Per Hedbor <ph@opera.com>

Use the new auth-api in more places

Rev: server/base_server/roxen.pike:1.649
Rev: server/base_server/rxml.pike:1.287
Rev: server/config_interface/event_log/clear_log.pike:1.6
Rev: server/etc/modules/RXML.pmod/module.pmod:1.143
Rev: server/etc/modules/Roxen.pmod:1.79
Rev: server/modules/filesystems/filesystem.pike:1.97
Rev: server/modules/filters/htaccess.pike:1.70
Rev: server/modules/proxies/wais.pike:1.24
Rev: server/modules/security/auth_httpcookie.pike:1.6
Rev: server/modules/tags/rxmltags.pike:1.217
Rev: server/modules/tags/ssi.pike:1.39
Rev: server/modules/throttling/throttling_byaddress.pike:1.3

7:   #define _rettext id->misc->defines[" _rettext"]   #define _ok id->misc->defines[" _ok"]    - constant cvs_version = "$Id: rxmltags.pike,v 1.216 2001/03/14 01:02:14 mast Exp $"; + constant cvs_version = "$Id: rxmltags.pike,v 1.217 2001/03/15 23:31:26 per Exp $";   constant thread_safe = 1;   constant language = roxen->language;   
235:      class EntityClientAuthenticated {    inherit RXML.Value; -  mixed rxml_const_eval(RXML.Context c, string var, string scope_name, void|RXML.Type type) { +  mixed rxml_const_eval(RXML.Context c, string var, +  string scope_name, void|RXML.Type type) { +  // Actually, it is cacheable, but _only_ if there is no authentication.    c->id->misc->cacheable=0; -  return ENCODE_RXML_INT(c->id->auth&&c->id->auth[0]&&c->id->auth[1], type); +  return ENCODE_RXML_INT(!!c->id->conf->authenticate( c->id ), type );    }   }      class EntityClientUser {    inherit RXML.Value; -  mixed rxml_const_eval(RXML.Context c, string var, string scope_name, void|RXML.Type type) { +  mixed rxml_const_eval(RXML.Context c, string var, +  string scope_name, void|RXML.Type type) { +  User u = c->id->conf->authenticate( c->id );    c->id->misc->cacheable=0; -  if(!c->id->realauth) return RXML.nil; -  return ENCODE_RXML_TEXT((c->id->realauth/":")[0], type); +  if(!u) return RXML.nil; +  return ENCODE_RXML_TEXT(u->name(), type);    }   }      class EntityClientPassword {    inherit RXML.Value; -  mixed rxml_const_eval(RXML.Context c, string var, string scope_name, void|RXML.Type type) { +  mixed rxml_const_eval(RXML.Context c, string var, +  string scope_name, void|RXML.Type type) {    array tmp;    c->id->misc->cacheable=0; -  if(c->id->auth -  && c->id->auth[0] -  && c->id->realauth +  if( c->id->realauth    && (sizeof(tmp = c->id->realauth/":") > 1) )    return ENCODE_RXML_TEXT(tmp[1..]*":", type);    return RXML.nil;