On Fri, Jan 23, 2009 at 12:10 PM, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> I am reposting this because I renamed the file
>
> I have a preliminary version of inclusion if T2 functionality into
> web2py core. I am not yet promising backward compatibility here. The
> module name many change. For now it is in trunk as gluon/utils.py
>
> Here is how you use it (assuming [app] is you application name).
>
> 1) put this in your model
<snip>

is it now data or still database?

> http://..../[app]/default/data/tables
> http://..../[app]/default/data/select/[app]_event
> http://..../[app]/default/data/create/[app]_event
> http://..../[app]/default/data/read/[app]_event/1
> http://..../[app]/default/data/update/[app]_event/1
> http://..../[app]/default/data/delete/[app]_event/1
>

<snip>

> auth.settings.captcha=RECAPTCHA
> (request,public_key='RECAPTCHA_PUBLIC_KEY',private_key='RECAPTCHA_PRIVATE_KEY')
>
> so that registration will use recaptcha
>
> then add

I put this in and restarted web2py (continued below)

> crud.auth=auth
>
> so that crud will enforce role based access control....

> now you lost the permission to access http://.../database/....
>
> now give yourself back permission *only* to select record in table
> [app]_user

but did not put these in and I can still get to database tables (do
these go in db.py just as as you have them, except [app], of course??

also above, /data/ or /database/??

> group_id=auth.add_group(role='Manager')
> auth.add_membership(group_id,auth.user.id)
> auth.add_permission(group_id,'select','[app]_user')
>
> or to delete users
>
> auth.add_permission(group_id,'delete','[app]_user')
>

<snip>

-wj

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to