Closed Sanni975 closed 2 years ago
With "personal layers", do you mean as in "my places"/userlayers/imported datasets that are only visible to that specific user? Or layers registered by the admin on an Oskari instance?
With personal layers I mean Oma karttataso (Personal/own map layer) which contains markings made by a logged user (does not show to other logged users).
Ok, the problem with restoring such layers is that they are not by default public. So logging out should remove them from the map in most cases. Otherwise we would be leaking data that the user considers private. However, if the users own layers have been used in embedded maps they are automatically marked as public. Such layers could be restored even for logged out user.
Ok, thank you for your help :)
Hi, I had a conversation regarding an auto save issue which occures when using personal layer in Oskari:
Sanni975 @Sanni975 Sep 08 09:46 Hi, I have a question regarding an update made into Oskari map service. Before the update, selected layers were automatically saved when logging out of Oskari. This feature enabled the user to continue working with the same layer view, when logging back in to Oskari. Nowadays the user must save the layer view to personal information tab. Does anyone have knowledge of what was reason for this update? Did the continuous autosave of layers burden Oskari map service? Did the update increase speed of the map service?
Response: Sami Mäkinen @ZakarFin Sep 08 17:50 Hi, the automatic state saving uses cookies actually so it's stored on the users browser and it hasn't been removed. Perhaps something is removing the cookie or preventing it from being sent to the server or there is some other cookies related problem? Can you see if this "oskaristate" cookie is being saved on the browser/sent to server on an XHR called "GetAppSetup" when loading the page: https://github.com/oskariorg/oskari-frontend/blob/1.55.2/bundles/framework/statehandler/plugin/SaveViewPlugin.js#L173 https://github.com/oskariorg/oskari-frontend/blob/master/bundles/framework/statehandler/plugin/SaveViewPlugin.js#L94-L99 You can also set a personalized start view for a logged in user. If that is used the cookie isn't respected but we restore the state from the saved view from the database (only for logged in users).
Would it be possible to develop Oskari map service so that it allows the user to save the cookies related to personal layers?