geosolutions-it / MapStore2

The solution to create and share maps, dashboards, geostories with 3D support on the web. And it is open-source too!
https://mapstore.geosolutionsgroup.com/
Other
508 stars 394 forks source link

Unadvertised resources #9583

Closed tdipisa closed 7 months ago

tdipisa commented 1 year ago

Description

Include the possibility to have unadvertised resources in MS: maps, dashboards and geostories (app contexts are excluded for now).

From the Edit properties panel of a resource it is possible for the admin/owner to make a resource unadvertised. Doing that, the resource will appear in the Home page or in the Map Catalog tool only for admin users or the owner (as per usual behaviour admins can change that setting for all resources and normal users only for their own resources).

image

~For other users accessing the resources directly (e.g. that can open the Edit Properties within it), we can consider to include a notifications simply to inform that the resource is Unadvertized so that they can be aware of this (for example the same as above screenshot but with the checkbox disabled).~

What kind of improvement you want to add? (check one with "x", remove the others)

Other useful information

offtherailz commented 11 months ago

I think there are some typos in this issue that make us difficoult to understand.

From my undestanding it is asking for "Unadvertized" resources not listed in Home and not listed in the Map Catalog plugin. In this case @tdipisa I suggest to use permalinks for this purpose. Does this satisfy the requirement? They are already not listed in maps or in Map catalog, because they belong to a different, separated category.

tdipisa commented 11 months ago

I think there are some typos in this issue that make us difficoult to understand. From my undestanding it is asking for "Unadvertized" resources not listed in Home and not listed in the Map Catalog plugin.

I've updated a bit the description to make it clearer. That's the point anyway, what is difficult tu understand here?

In this case @tdipisa I suggest to use permalinks for this purpose. Does this satisfy the requirement? They are already not listed in maps or in Map catalog, because they belong to a different, separated category.

Why using permalinks should satisfy the requirements that are asking for a completely different thing? Unadvertized resources must be anyway visible in MS Catalog but only for admins.

dsuren1 commented 10 months ago

@tdipisa Kindly clarify So the Unadvertised flag takes precedence over group permission? (i.e when the resource is Unadvertised, and group permission is everyone with can view/edit, it is still ignored and treated as a private resource)

tdipisa commented 10 months ago

@tdipisa Kindly clarify So the Unadvertised flag takes precedence over group permission? (i.e when the resource is Unadvertised, and group permission is everyone with can view/edit, it is still ignored and treated as a private resource)

@dsuren yes, I think this from description make it already quite clear:

Doing that, the resource will appear in the Home page or in the Map Catalog tool only for admin users or the owner

isn't it?

dsuren1 commented 10 months ago

So in that case, wouldn't it be better that we disable the group permission options when unadvertised field is checked ?

tdipisa commented 10 months ago

No, nothing should change for this.

dsuren1 commented 10 months ago

Okay. Thanks

offtherailz commented 10 months ago

@tdipisa I had a sync with @dsuren1 about this task. For our investigation we absolutely need a backend support for this feature. Actual filtering support on client side is not enough for providing this functionality.

tdipisa commented 10 months ago

Blocked waiting for further evaluations on the backend.

afabiani commented 9 months ago

@tdipisa this issue is currently blocked by this

afabiani commented 9 months ago

@tdipisa @offtherailz PR for the backend available here

tdipisa commented 9 months ago

Thank you @afabiani. @offtherailz will review asap.

offtherailz commented 8 months ago

Reporting usage info

Basically you have to add to POST/PUT requests for create/edit the resource adding the advertised tag in the request XML. Here below some examples verified working on geostore from pr https://github.com/geosolutions-it/geostore/pull/332 :

<Resource>
    <description>
        <![CDATA[]]>
    </description>
    <metadata></metadata>
    <name>
        <![CDATA[a]]>
    </name>
    <advertised>
        false
    </advertised>
</Resource>

I also added an example here:

https://github.com/geosolutions-it/geostore/wiki/REST-API-examples

tdipisa commented 8 months ago

@Igi-ID (FYI @offtherailz) GeoStore PR https://github.com/geosolutions-it/geostore/pull/332 has been merged, therefore we can proceed implementing the front-end part. Thank you.

offtherailz commented 8 months ago

@tdipisa just a clarification for this:

tool only for admin users or the owner (as per usual behaviour admins can change that setting for all resources and normal users only for their own resources).

In our case I think this checkbox should be show to everyone that can edit the resource, that is consistent with the rest of the model. Alternative informations we have on the resource are:

Please confirm that unadvertised should be shown to every user that have edit permissions on it.

tdipisa commented 8 months ago

In our case I think this checkbox should be show to everyone that can edit the resource, that is consistent with the rest of the model. Please confirm that unadvertised should be shown to every user that have edit permissions on it.

Confirmed @offtherailz @Igi-ID AC not so well expressed, it seems.