On Wed, Mar 12, 2014 at 8:42 AM, Kiran Subbaraman <[email protected]> wrote: > Thanks for confirming that it is working as designed. > I modified the code so that now I perform a > auth.define_tables() > auth.define_tables(signature=True)
Sorry, Kiran. I made a mistake and a great confusion. auth.define_tables() will create your auth tables without signature fields. You don't need to call auth.define_tables(signature=True) if you don't want these fields there. But if you want to audit changes in all other tables, you have common fields [1] and record versioning [2] features. > > * Will this serve the purpose of auditing (date-stamping, and recording user > info) changes to the auth tables, for newer records now or the signature > piece of code doesn't serve a purpose now? The signature piece does have this purpose, but if you called auth.define_tables() without the signature parameter, there will be no auditing fields in auth tables. > * It will be nice if the documentation elaborates on this a bit - should I > open an issue to request for these details? You may improve documentation and pull request it. ;-) > * And am unable to figure out where the code related to this feature is > located. Any suggestions? In gluon/dal.py (for db object, which is a DAL instance created in your models/db.py) and in gluon/toos.py (for auth object, which is an Auth instance, created in your models/db.py). -- Vinicius Assef [1] http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Common-fields-and-multi-tenancy [2] http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Record-versioning > > On Wed, 12-03-2014 4:52 PM, Vinicius Assef wrote: >> >> Yes, it is. >> >> To avoid the auth.signature from auth tables, call >> auth.define_tables() before auth.define_tables(signature=True). >> >> On Wed, Mar 12, 2014 at 5:44 AM, Kiran Subbaraman >> <[email protected]> wrote: >>> >>> Hello, >>> I just recently added a >>> auth.define_tables(signature=True) >>> >>> and noticed that the auth_user table now contains a few additional >>> columns, >>> and this one caught my attention - the "is_active" column. >>> The only documentation I noticed around this is: >>> http://web2py.com/books/default/search/29?search=is_active ... and >>> interestingly I do not see "is_active" in the source code anywhere. >>> >>> Basically, I noticed that the is_active column is introduced to the >>> auth_user definition, and the value is None. I realize this means the >>> users >>> with is_active=True are the ones who can login, or use the application. >>> Also, does this mean that the following code is applicable to >>> is_active=True? >>> db.auth_user.email.requires = (IS_LOWER(), IS_NOT_IN_DB(db, >>> 'auth_user.email')) >>> >>> Am asking this because I notice that I can create users in the system >>> with >>> the same email id(one of them is_active=True, and the other is >>> is_active=False or None). Is this working as designed? >>> >>> -- >>> >>> ________________________________________ >>> Kiran Subbaraman >>> http://subbaraman.wordpress.com/about/ >>> >>> -- >>> 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 [email protected]. >>> For more options, visit https://groups.google.com/d/optout. > > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

