On Monday, June 15, 2015 at 7:57:14 AM UTC-4, dt0...@gmail.com wrote:
>
> Hi,
>
> Excellent product web2py but still trying to get my head around some of 
> the structure
> and some burning questions from the documentation.
>
> Question 1:
> I want my auth tables to have an audit table.
> So i uncommented the following line in db.py:
>
>
> auth.enable_record_versioning(db)
>
>
> Now this did not work:
>
> So some more reading and there is a mention of extra columns in the auth 
> table that are needed.
>
> Such as modified_by etc...
>
> 1) I don't know the definition of these extra columns needed.
>
>
When Auth is initialized, a dummy table with is_active, created_by, 
created_on, modified_by, and modified_on fields is created and stored in 
auth.signature. You can add those fields to individual tables by doing 
db.define_table(..., auth.signature), and you can also add those fields to 
all Auth tables by doing auth.define_tables(..., signature=True).
 

> 2) Shouldn't the auditing as these by default if they are needed?
>
>
Maybe, but for now, you have to first add the relevant fields before 
enabling versioning.
 

> Also there is a bit of the documentation that says signature should equal 
> True for auditing to work.
>
> Is that right? Isn't signature for SSL?
>
>
Not sure what you mean by that. The term "signature" is somewhat generic 
and has different meanings in different contexts. In the context of 
auth.define_tables(), the "signature" argument refers to adding those extra 
fields to each Auth table (semantically, the idea is that the created_by 
and modified_by fields are like a signature, given that they record the 
identify of the user who created/modified the record).

Anthony

-- 
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.

Reply via email to