(self, can_access_all_locations, selected_group_ids, selected_user_types,
                                location_ids, user_ids)
return [OR(
            OwnerFilter(list(owner_filter_ids)),
            LastModifiedByFilter(last_modified_filter_ids),
            *self._get_group_independent_filters(
                can_access_all_locations, selected_user_types, location_ids, user_ids
            )
        )]
for full organization access:
            for selected groups return group ids and groups user ids otherwise fetches case sharing groups and
            locations ids
        for restricted access:
            fetches case sharing location ids
        :return: set of filters using OwnerFilter and LastModifiedByFilter along with group independent filters
for full organization access:
            for selected groups return group ids and groups user ids otherwise fetches case sharing groups and
            locations ids
        for restricted access:
            fetches case sharing location ids
        :return: set of filters using OwnerFilter and LastModifiedByFilter along with group independent filters
for full organization access : for selected groups return group ids and groups user ids otherwise fetches case sharing groups and locations ids for restricted access : fetches case sharing location ids : return : set of filters using OwnerFilter and LastModifiedByFilter along with group independent filters
def _get_filters_from_slugs(self, can_access_all_locations, selected_group_ids, selected_user_types,
                                location_ids, user_ids):
        """
        for full organization access:
            for selected groups return group ids and groups user ids otherwise fetches case sharing groups and
            locations ids
        for restricted access:
            fetches case sharing location ids
        :return: set of filters using OwnerFilter and LastModifiedByFilter along with group independent filters
        """
        group_ids = None

        if can_access_all_locations:
            group_ids = selected_group_ids

        owner_filter_ids = []
        last_modified_filter_ids = []
        if group_ids:
            groups_static_user_ids = Group.get_static_user_ids_for_groups(group_ids)
            groups_static_user_ids = flatten_non_iterable_list(groups_static_user_ids)
            owner_filter_ids = group_ids + groups_static_user_ids
            last_modified_filter_ids = groups_static_user_ids

        return [OR(
            OwnerFilter(list(owner_filter_ids)),
            LastModifiedByFilter(last_modified_filter_ids),
            *self._get_group_independent_filters(
                can_access_all_locations, selected_user_types, location_ids, user_ids
            )
        )]
def _get_filters_from_slugs ( self , can_access_all_locations , selected_group_ids , selected_user_types , location_ids , user_ids ) : group_ids = None if can_access_all_locations : group_ids = selected_group_ids owner_filter_ids = [ ] last_modified_filter_ids = [ ] if group_ids : groups_static_user_ids = Group . get_static_user_ids_for_groups ( group_ids ) groups_static_user_ids = flatten_non_iterable_list ( groups_static_user_ids ) owner_filter_ids = group_ids + groups_static_user_ids last_modified_filter_ids = groups_static_user_ids return [ OR ( OwnerFilter ( list ( owner_filter_ids ) ) , LastModifiedByFilter ( last_modified_filter_ids ) , * self . _get_group_independent_filters ( can_access_all_locations , selected_user_types , location_ids , user_ids ) ) ]