-
Notifications
You must be signed in to change notification settings - Fork 1
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
Design discussion #1
Comments
also cc @georgehrke @juliushaertl @skjnldsv :) |
We should have a common/protected namespace for a guest username, so talk, deck, text,... Can all use the same guest name |
👍 for scoped/namespaced storage per app. What about clearing data? Anything sensitive should be wiped on logout. But apparently jsxc has data that should persist. Do we need two types of storage/values? |
For Talk we would mostlikely only add stuff that would be okay to persist like: |
For calendar it would be nice to keep a list of calendars. So something we definitely have to wipe on logout. |
I need a way to store some data in a way that it's not deleted after logout, but I think in general Nextcloud should only delete data which was stored by an Nextcloud App (using this new api for example). Otherwise Nextcloud potentially messes with other applications running under the same domain, due to the fact that NC supports installation in a subdirectory. |
Sure. As soon as we have our own abstraction that can scope the storage, it should be also trivial to scope that. |
Something like the following should do the trick:
|
Let's leave implementation aside.
|
We need nearly the complete storage interface except for the |
How do we want to handle the requirement app A wants data cleared on logout, app B doesn't? I started the implementation at #2. I used a similar API as we have for https://nextcloud.github.io/nextcloud-logger/. The builder already has an option for persist, but right now that just determines if you'll get session storage or local storage. There could be something similar that says I want persistend storage that survives logouts. It's just a matter of storing this flag internally and checking on |
Please see #2 :) |
I was thinking a lot about this in the last few days and I think the whole idea to implement a session store on top of a persistent storage is crazy. If an app wants to store some information only for the current session, it should use the session storage (this could also be cleared on logout) and if an app wants to store information persistent it should use the local storage. This was probably the intention when those interfaces were specified. In the case that NC really wants to clear the persistent storage, there should be a possibility for an app to opt-out. Therefore I propose the following: If an app really wants to use a persistent store it should create a key in the form
That would be maybe slightly slower, but it's easy to implement and it doesn't require to change any app code. |
Only partly true because a Nextcloud session can live longer than a browser session due to the remember-me feature.
Yes, just like I implemented it here https://github.com/nextcloud/nextcloud-browser-storage/pull/2/files#diff-ce25cc9fe753b7439e6c13a3a30df75cR30-R34. This only clears the values saved through the abstraction. |
I didn't consider that. You are right. |
So lets do this as a V1 and then continue from there? |
Hi 👋
I created this repo for nextcloud/server#15943 (comment). I went for the broader term browser storage, so this can cover not only the local storage APIs but potentially offer a wider API.
@sualko what are the basic operation you need for jsxc?
The text was updated successfully, but these errors were encountered: