[isf-wifidog] Open Closed times

Benoit Grégoire bock at step.polymtl.ca
Sam 16 Juin 09:56:58 EDT 2007

On Friday 15 June 2007, Robin Jones wrote:
> Hi all,
> I have been interested in WiFiDog for quite a while but at the moment it is
> not quite to the stage of development I need it to be... I am currently
> using PublicIP (which is based on WiFiDog with a custom Auth Server) but am
> not happy that I am not in full control of the Auth Server and cannot push
> for features that I need.
> As such I would like to become more active with your community and help get
> WiFiDog to a point where I can use It to offer my customers the best
> solution for them!!!


> This is the first thing I would like to help with (it is already a feature
> suggestion for Auth Server 2.0), and with a little help, I will try to
> implement it based on the feedback I receive!

Yes, http://dev.wifidog.org/ticket/116

> As I see it there are three ways to add open and closed times to WiFiDog.
> 3)     Add rules to a file on the Auth Server through a PHP interface. The
> auth server continually checks the time and when it is out of scope The
> portal page changes so that the login form is removed and replaced with the
> open times. Again the heartbeat will stop so the existing users are
> forcefully removed.
> Some more considerations would be a white list for super users or a secret
> login page???

This will be easy once I finish the new role system (real soon now), by simply 
adding a NODE_BYPASS_OPENING_HOURS permission.  There would be a separate 
page when the hotspot is down instead of the login page.  The little login 
button on the top left would still be there, but the user woul need to have 
the appropriate permission to actually use it.

> What do you guys think, and would you do it differently?

Well, this definitely needs to go on the auth server side in the database (not 
a separate file, this code is very performance critical).  Implementing the 
actual closing is actually REALLY easy:  change the auth response to the 
gateways to deny.  But as I said in april:  
Well, while that's cool UI sugar, the first thing we need is a good opening 
hours model.  Something that can do (minimally) different opening hours for 
different days of the week, and ideally deal with exceptions (holidays, 

Anybody know a good data model for this type of thing?  We need something 
where we can have a "is this hotspot open" in a single SQL query, otherwise 
there will be a considerable performance hit.

I didn't get any replies, so here's a first stab at it to stimulate 

-start_time NOT NULL
-end_time NOT NULL

The most specific rule that matches the current day would be taken into 
account.  The advantage of doing it rule based like this, is that it handles 
all exceptions, can generate a table of opening hours easily, and has a 
fairly simple to code admin interface.
The drawback is that it takes some pretty clever SQL request to do the check 
in a single request, but it can be done.
Benoit Grégoire
Technologies Coeus inc.
-------------- section suivante --------------
Une pièce jointe non texte a été nettoyée...
Nom: non disponible
Type: application/pgp-signature
Taille: 189 octets
Desc: non disponible
Url: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20070616/0e5c1963/attachment.pgp 

Plus d'informations sur la liste de diffusion WiFiDog