ErwinKomen / RU-passim

0 stars 0 forks source link

My Datasets: Default #770

Closed shariboodts closed 1 month ago

shariboodts commented 1 month ago

When viewing My Datasets from MyPASSIM, the default setting shows all datasets a user has access to (Private + Public + Team). Please set the default so the list view only shows Private datasets (the scope filter can then be used to view Public and Team datasets).

ErwinKomen commented 1 month ago

Owner or Private?

Right now the 'current size' in MyPassim shows the number of datasets a user is the owner of. In my case, for example, that is 13. However, I do not have any private datasets.

So what should the Saved datasets initially focus on?

  1. As the count indicates: all datasets of which the user is the owner
  2. It should only point to all the user's private datasets, which means that the 'current size' should be adapted

P.I. (19/jun): option (2) is the best one

ErwinKomen commented 1 month ago

Implementation

This is the 'default' setting for /dataset/private/list = CollectionListView with prefix priv Note: the user should still be able to view all he/she has access to (Private, public, team - with the scope filter).

Note: if focusing on user, e.g. ?priv-owner={}, where the {} is the id of the owner

            # Set the initial configuration for the saved datasets
            if method_startup == "private":
                obj = FieldChoice.objects.filter(field=COLLECTION_SCOPE, abbr="priv").first()
                if not obj is None:
                    context['start_datasets'] = "?priv-colscope={}".format(obj.id)
            # Alternative: set the owner
            elif method_startup == "owner":
                context['start_datasets'] = "?priv-owner={}".format(profile.id)
ErwinKomen commented 1 month ago

Okay, the 'implementation' above works. However, it should also be possible to overtly filter on owner, then...

Okay, added that too