I made the changes you said, I also test the app with the V. 1.99.7 I also create a new app called TEST with the wizard without add anything else. Once created the new APP i just add this lines to db.py :
db.auth_user.password.requires = [IS_STRONG(),CRYPT(key=auth.settings.hmac_key)] I chose a good password and after i went to this link page to change user info http://127.0.0.1:8000/TEST/appadmin/update/db/auth_user/1 I try the submit and i got the same IS_STRONG controls Error. So with 2 differnts apps 2 different framework version, 2 different db i got the same Controll error. Could it be due to the use of the Wizard App creation?. Thanks for help Il giorno sabato 13 ottobre 2012 16:42:26 UTC+2, Massimo Di Pierro ha scritto: > > You do not need two decorators: > > @auth.requires_login() > @auth.requires_membership('risorse_umane' or 'admin') > > auth.requires_membership also requires login. > You cannot do > @auth.requires_membership('risorse_umane' or 'admin') > because that is the same as > @auth.requires_membership('risorse_umane') > since 'risorse_umane' evaluates to True. > > There may be something else going on. > > > > On Friday, 12 October 2012 10:04:35 UTC-5, piero crisci wrote: >> >> I tryed to find others with the same iusse problem without understand how >> to solve the problems :( >> >> I set in the db.py the follow table >> >> ######################################## >> db.define_table('auth_user', >> Field('username', type='string', >> label=T('Username')), >> Field('first_name', type='string', >> label=T('First Name')), >> Field('last_name', type='string', >> label=T('Last Name')), >> Field('email', type='string', >> label=T('Email')), >> Field('password', type='password',length=512, >> readable=False, >> label=T('Password')), >> Field('created_on','datetime',default=request.now, >> label=T('Created On'),writable=False,readable=False), >> Field('modified_on','datetime',default=request.now, >> label=T('Modified On'),writable=False,readable=False, >> update=request.now), >> Field('registration_key',default='', >> writable=False,readable=False), >> Field('reset_password_key',default='', >> writable=False,readable=False), >> Field('registration_id',default='', >> writable=False,readable=False), >> format='%(username)s', >> migrate=settings.migrate) >> >> >> db.auth_user.first_name.requires = >> IS_NOT_EMPTY(error_message=auth.messages.is_empty) >> db.auth_user.last_name.requires = >> IS_NOT_EMPTY(error_message=auth.messages.is_empty) >> #db.auth_user.password.requires = [ IS_STRONG(min=8, >> number=1,special=1,error_message = "La password deve contenere almeno 8 >> Caratteri, un Numero, un Carattere Speciale, un carattere Maiuscolo"), >> CRYPT(key=auth.settings.hmac_key)] >> db.auth_user.password.requires= [*IS_STRONG(min=8), >> CRYPT(auth.settings.hmac_key)*] >> >> db.auth_user.username.requires = IS_NOT_IN_DB(db, db.auth_user.username, >> error_message = 'Username già censita') >> db.auth_user.email.requires = >> (IS_EMAIL(error_message=auth.messages.invalid_email), >> IS_NOT_IN_DB(db, >> db.auth_user.email,error_message = 'Email già censita')) >> auth.define_tables(migrate = settings.migrate) >> >> I set in the default.py this def for manage the user changes . >> >> @auth.requires_login() >> @auth.requires_membership('risorse_umane' or 'admin') >> def anagrafica_utenti_db_manage(): >> form = SQLFORM.smartgrid(db.auth_user,onupdate=auth.archive) >> return locals() >> >> When i try to modify the name or the surname the framework rise the >> IS_STRONG control even if i don't touch the password string. >> I am new with web2py and i want just to know if i need to create a form >> to make the user changes or i can fix this problem using the smartgrid. >> I also set the "Requires approval" for the new registration. How can i >> delete the "Pending" in the registration key ? (I can t do it right now >> because of the IS_STRONG control. >> Thanks for help >> And sorry for bother you >> > --

