-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Share plugin - Permalink - Add a permalink functionality #9250
Comments
|
Permalink creates in fact a snapshot of the current state of the resource. Creating it from outside do not make so much sense (in fact it may be only a copy with limited functionalities, not so much useful in this case). So I think we should avoid it.
The user can create how many permalinks he wants. Considere that the permalink do not depend on the current resource. In fact, it is a freeze of the current state of the resource, reachable by a link. |
Meeting minuteWe make Permalink a separate plugin. This way we have :
|
With respect to this. I will create a separate PR to handle it |
Description
Add new permalink functionality to the Share plugin
Acceptance criteria
Other useful information
georchestra/mapstore2-georchestra#583
Suggested implementation
The permalink is a map (but can be a context, geostory ...) resource in PERMALINK category that has to be saved on MS DB, with
attributes:
title
: the title of the item (mandatory for permalinks, inserted by user)description
: the description (not mandatory, inserted by user )type
: possible values - map, context (possible also dashboard and geostory) - mandatory, saved by the share toolpathTemplate
: the path tempalte to use. E.g.#/viewer/${id}
or#/context/${name}?category=PERMALINK
... - mandatory - saved by the share tool. For context, the param category helps to fetch correct resource by category upon page reloadThe
daŧa
of the resource is the data we whould save if we save the map at the current status ( so extracting the current status as well as save as tool does, but saving it in a different category).Using
pathTemplate
helps the permalink to be generic and not hard-coding the specific redirects to the pages.So loading the resource is simple as loading the original ones (by redrecting to the path created with the path template), using the trick of storing them in a different category to not list them in the extisting items.
An entry point
#permalink/{name}
should be implemented, with proper login checks accordingly with the standard workflow when accessing the resource is somehow erroring.For instance it should prompt a login if the resource is not public and the user is not logged in, or show the proper error messages (error 404).
As soon as the permalink is loaded in the browser, the type is parsed to redirect to :
/#/viewer<resourceId>
in case of map#/context/<hash>
in case of contextNotes about everyone group
Actually the save tool asks for GeoStore API to different entry points depending on the user role to retrieve the usergroups the user can select in permission form :
This can be a good wayt to retrive the
everyone
group id when saving the resource to make it public.about save tool in resource
Because we are using the existing entry points to see the resources (e.g.
viewer/123
) we may have the save tool present. We need to check if this introduces a feature (e.g . to change the permission in a more fine grained way) of if it may introduce some bugs (e.g. overriding existing attributes and making the permalink unuseble).Let's check after first implementation what is the final result, so we can take a decision about how to handle this case (e.g. to hide somehow the save tool or whatelse).
Also management and delete of existing permalink can be decided in a second time.
after discussion we noticed it could be better to include the permalink as a separated plugin, child of share plugin.
The text was updated successfully, but these errors were encountered: