I ended up creating my own version of the mountindex management command in 
a custom app

On Wednesday, August 8, 2018 at 5:16:01 PM UTC-4, Roberto Rosario wrote:
>
> Makes sense to filter documents. An ideal solution would be to correlation 
> the OS username to a Mayan user to inherit the permission. Or in the mean 
> time a filtering method via the mountindex command line to avoid needing to 
> change the code. Your question brings an interesting proposition to the 
> mountindex feature.
>
> On Tuesday, July 31, 2018 at 8:52:01 AM UTC-4, LeVon Smoker wrote:
>>
>> I figured it out eventually. In the 
>> mirroring/management/commands/mountindex.py, I added...
>> acls = AccessControlList.objects.filter(role__label='My Role', 
>> permissions__name='document_view')
>> queryset = queryset.filter(acls__in=acls) 
>>
>>
>>
>> On Friday, July 27, 2018 at 10:12:21 AM UTC-4, LeVon Smoker wrote:
>>>
>>> How can I do this? I intend to make my own version of the mountindex 
>>> command that would allow filtering documents based on a role. I assume it's 
>>> like filtering on a Generic Relation, but I can't figure it out...
>>>
>>>
>>> https://docs.djangoproject.com/en/1.11/ref/contrib/contenttypes/#django.contrib.contenttypes.fields.GenericRelation
>>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to