"Recently created" widget permission?

When things don't work as they should.
Post Reply
Posts: 37
Joined: Wed Sep 05, 2018 3:52 pm

"Recently created" widget permission?

Post by lsmoker »

Is it intended that this widget will not list any documents if the user's role does not have "permission_document_type_view"? Clicking "View details" will show the documents. It seems odd, but I might be missing something.

The code is here -> https://gitlab.com/mayan-edms/mayan-edm ... ments#L172

Code: Select all

class DashboardWidgetUserRecentlyCreatedDocuments(DashboardWidgetList):
    columns = ('datetime_created', 'label',)
    icon = link_document_recently_created_list.icon
    label = link_document_recently_created_list.text
    link = reverse_lazy(

    def get_object_list(self):
        AccessControlList = apps.get_model(
            app_label='acls', model_name='AccessControlList'
        RecentlyCreatedDocument = apps.get_model(
            app_label='documents', model_name='RecentlyCreatedDocument'

        queryset = RecentlyCreatedDocument.valid.all()

        return AccessControlList.objects.restrict_queryset(
            permission=permission_document_type_view, user=self.request.user,
LeVon Smoker
User avatar
Posts: 276
Joined: Sun Apr 19, 2020 6:21 am

Re: "Recently created" widget permission?

Post by michael »

Fixed in version 4.2.8 => https://gitlab.com/mayan-edms/mayan-edm ... ISTORY.rst

Thanks for the report.
Post Reply