On Wednesday, November 4, 2015 at 6:19:41 AM UTC-8, digirew wrote: > > Hello, > > I have a folder (html files & png as images) that I would like to password > protect and only have specified users access. > > Can I set this up using web2py? or do they all need to be pages created in > web2py? > > You can use the auth mechanisms to require login and group membership before your controller will access the folder (if you're restricting the whole folder; that's the easy case). If you are trying to restrict *some* files within a folder, you'd need a table somewhere (like in the db, since you already have a db) that tells you which files require login, and then apply the auth mechanisms <URL:http://web2py.com/books/default/chapter/29/09/access-control> and read at least through the group memberships.
If you want a *second* password for particular files, you may be able to use the auth mechanisms, but I haven't played with them enough to be able to give you any details about that. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.