(user)
Gets allowed plugins uids for user given.

    :param django.contrib.auth.models import User:
    :return list:
Gets allowed plugins uids for user given.
Gets allowed plugins uids for user given .
def get_allowed_plugin_uids(user):
    """Gets allowed plugins uids for user given.

    :param django.contrib.auth.models import User:
    :return list:
    """
    try:
        queryset_groups = DashboardPlugin \
            ._default_manager \
            .filter(groups__in=user.groups.all()) \
            .distinct()
        queryset_users = DashboardPlugin \
            ._default_manager \
            .filter(users=user)\
            .distinct()
        queryset = queryset_groups | queryset_users
        queryset = queryset.only('plugin_uid')
        return [obj.plugin_uid for obj in queryset]
    except Exception as err:
        if DEBUG:
            logger.debug(err)
        return []
def get_allowed_plugin_uids ( user ) : try : queryset_groups = DashboardPlugin . _default_manager . filter ( groups__in = user . groups . all ( ) ) . distinct ( ) queryset_users = DashboardPlugin . _default_manager . filter ( users = user ) . distinct ( ) queryset = queryset_groups | queryset_users queryset = queryset . only ( 'plugin_uid' ) return [ obj . plugin_uid for obj in queryset ] except Exception as err : if DEBUG : logger . debug ( err ) return [ ]