hi,
i want to learn and implement public, password protected and private
view for user, is there anyone know how to do that?
thank you so much before
e.g.
=== model ===
db.define_table('files',
Field('title',
label = T('Title')
),
Field('description',
'text',
label = T('Description')
),
Field('files',
'upload',
uploadfield = 'files_data',
label = T('Files')
),
Field('files_data',
'blob',
label = T('Files Data')
),
Field('visibility',
'list:string',
label = T('Visibility')
),
Field('password',
'password',
label = T('Password')
),
auth.signature
)
db.files.visibility.requires = IS_IN_SET(('Public',
'Private',
'Protected'))
db.files.password.requires = IS_EMPTY_OR(IS_STRONG(min = 6,
special = 1,
upper = 1))