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 [email protected].
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.

Reply via email to