Hi Stifan,

I guess I didn't properly phrase my question but I really appreciate your 
response. 

Currently users can access one of our databases using the grid layout. I 
want to give them the option of only seeing select fields through some type 
of checkbox or multiple select. Like this: 
http://dev.s-cubism.com/plugin_multiselect_widget

>From there I want to only show select fields in the database on their 
selection and give them the ability to save the view.

I hope this paints a little clearer pictures.

On Thursday, April 10, 2014 10:52:33 AM UTC-4, 黄祥 wrote:
>
> if you set the access control correctly and set the logical for that it 
> can be done, for menu i think you can do something like :
> *controllers/install.py*
> def index():
> if db(db.auth_permission).isempty() and db(db.auth_membership).isempty():
> # group
> auth.add_group('Finance', 'Finance')
>  # user
> db.auth_user.bulk_insert([{"first_name" : "Finance", "last_name" : 
> "Manager", 
>    "email" : "finance...@a.com <javascript:>", "username" : 
> "financemanager", 
>    "password" : db.auth_user.password.validate("password")[0]}, ])
>  """
> membership (group_id, user_id)
> """
> # Finance
> auth.add_membership('1', '1')
> session.flash = T('Installation Done')
> redirect(URL("default", "index") )
>
> *models/menu.py*
> if auth.has_membership(role = 'Finance'):
>     response.menu += [
> (T('Finance'), False, URL('default', 'index'), [
> (T('Master'), False, URL('finance_master', 'index'), [
> (T('Bank'), False, URL('finance_master', 'bank'), []),
> ]),
> (T('Transaction'), False, URL('finance_transaction', 'index'), [
> (T('Payment'), False, URL('finance_transaction', 'payment_cart'), []),
> ]),
> (T('Report'), False, URL('finance_report', 'index'), [
> (T('Payment'), False, URL('finance_report', 'report_payment'), []),
> ]),
> ]), 
>     ]
>
> best regards,
> stifan
>

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