[web2py] Re: Web3py Auth
Many2many: I think a generic tagging api is a great idea in general for web3py. If we can leverage that for auth groups too, then why not. Clearly a link table adds complexity to all the queries, but if this is properly serviced by the api, then no prob. Hierachical tagging, nested sets always seem to be a real pain point for SQL unless recursive CTEs used. But then things start getting a little tricky as the existing DAL doesn't do that (yet?). There is still one easy option available though: materialised path. I think this is a great idea because the queries are super-simple and could easily be implemented for all sorts of hierarchical data structures. The above options would be more than I suggested for auth groups, but would both enhance the feature-set of web3py and find lots of applications. Thanks for thinking about these possibilities! On Tuesday, 21 May 2019 04:31:06 UTC+1, Massimo Di Pierro wrote: > > I am thinking for something. I am thinking of a generic tagging api which > wold allow you to tag any object using efficient many2many and use > hierarchical tags. > You would be able to tag users with group tags and efficiently search > groups for users and users by group. I have a prototype but it will not go > into the auth.py module. > would that be ok? > > > On Monday, 20 May 2019 08:35:21 UTC-7, villas wrote: >> >> Hi Massimo >> Thanks for the auth implementation. However, I personally think Groups >> are an essential feature of any auth. >> >> As a suggestion, could you please consider at least a slimmed-down >> version of Groups. I am thinking simply this: >> >>- Extra field: auth_user.group_ids list:reference >>- Table: auth_group, (id, name) >>- Function: is_user_in_groups(user=auth.user, groups=[], all=True) >> - if all==False* then 'any'* >> - groups could be list of ids or names >> >> Many thanks for your consideration! D >> >> -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/6e548bc2-7b9d-4840-b015-e1084ec4b2ca%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web3py Auth
I use the groups and permissions mechanics extensively in my applications. They're useful for lots of stuff. Sharing can be as simple as giving permission for a record. I also use tags for the same purpose but they're better for stuff which will be changing based on properties of an entity instead of explicit permissions. I think there should be both. Note that RBAC is kind of a standard that people understand, and while you can implement it with tags it's not so straightforward and easy to understand in practice because tags tend to originate a kind of spaghetti that makes understanding how the system works murkier. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/9afb6012-78d8-4294-b674-e2d69db98fbd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web3py Auth
> > I am thinking for something. I am thinking of a generic tagging api which > wold allow you to tag any object using efficient many2many and use > hierarchical tags. > You would be able to tag users with group tags and efficiently search > groups for users and users by group. I have a prototype but it will not go > into the auth.py module. > would that be ok? > an example in _scaffold is enough i think, learn from web2py auth, sometime user created table that even needed on the first place, e.g. auth_cas just a suggestion perhaps for web2py, it's nice to implement 'explicit better than implicit', e.g. explicitly define which auth's table will be created and modified the fields (add new fields, rename generated auth fields, deleted generated fieldsetc) 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/fa82e1ef-ba34-4451-b6ca-1c9c7c3902ea%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web3py Auth
I am thinking for something. I am thinking of a generic tagging api which wold allow you to tag any object using efficient many2many and use hierarchical tags. You would be able to tag users with group tags and efficiently search groups for users and users by group. I have a prototype but it will not go into the auth.py module. would that be ok? On Monday, 20 May 2019 08:35:21 UTC-7, villas wrote: > > Hi Massimo > Thanks for the auth implementation. However, I personally think Groups > are an essential feature of any auth. > > As a suggestion, could you please consider at least a slimmed-down version > of Groups. I am thinking simply this: > >- Extra field: auth_user.group_ids list:reference >- Table: auth_group, (id, name) >- Function: is_user_in_groups(user=auth.user, groups=[], all=True) > - if all==False* then 'any'* > - groups could be list of ids or names > > Many thanks for your consideration! D > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/2e19bc13-3571-484e-bbf5-3e5eb6c26e79%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.