Skip to content
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

Disable Delete Option #3345

Closed
passionate2023 opened this issue Nov 24, 2022 · 11 comments
Closed

Disable Delete Option #3345

passionate2023 opened this issue Nov 24, 2022 · 11 comments

Comments

@passionate2023
Copy link

Describe feature

#1. Assume i have hosted trilium in a server. Does any user who goes through the notebook will be able to delete the content?
#2. Can we have read only users who can only read which has been published in the server by the admin
#3. Best vps or recommended vps for hosting

Additional Information

No response

@zadam
Copy link
Owner

zadam commented Nov 24, 2022

Hi, Trilium is a single user application. A logged-in user can do anything.

What you describe sounds similar to Sharing. The "published" pages are then publicly available as a web page and the readers can't delete or otherwise alter the published notes.

@passionate2023
Copy link
Author

Can i share the whole entire notebooks where the user can't delete it?

How to stop the user to make any changes or delete any content?

Basically they should be able to search, view/read the content but not modify neither delete it

@passionate2023
Copy link
Author

also what is the minium RAM required for linux vps hosting?

@sigaloid
Copy link
Contributor

Basically they should be able to search, view/read the content but not modify neither delete it

This is how sharing works, correct - no one but the main user can edit, everyone else sees a static HTML page.

also what is the minium RAM required for linux vps hosting?

According to my customer's stats, on average 120-150MB for a medium-sized database - that's just for the container. Add the host OS + reverse proxy and it probably needs double that. So somewhere in the ballpark of 256-512MB.

@passionate2023
Copy link
Author

Thanks a for the further details.

Is it possible to have searching of "All Notes" for the shared user. I want to share the entire notebook or all the notes and he has to search all the notes and not individual note search. Is searching is available to search for all the notes for the shared user instead of search in every single page for the shared user.

I'm looking for search similar to the main user for the entire notebook

@sigaloid
Copy link
Contributor

sigaloid commented Nov 25, 2022

No - but this is a valid feature request and you should definitely consider filing a feature request.

@passionate2023
Copy link
Author

Is disabling the delete option is available in any of the latest release?

1 similar comment
@passionate2023
Copy link
Author

Is disabling the delete option is available in any of the latest release?

@sottey
Copy link

sottey commented Sep 1, 2023

There is no event handler for before an event is deleted, there is only one for after: "onEventRemoved.

One approach would be to figure out the class names of the Remove toolbar icons and the remove button in the dialog box and set those to display = "none";

So the short answer is "no, not without coding a bit"

@sottey
Copy link

sottey commented Sep 1, 2023

Also, regarding the hosting, I am using a DigitalOcean droplet which has 2gig of RAM and 60 gig of space and it is more than enough. Using the docker image in a droplet was a bit tough for me at first, but once I figured it out, it's been great!

@zadam
Copy link
Owner

zadam commented Sep 5, 2023

One approach would be to figure out the class names of the Remove toolbar icons and the remove button in the dialog box and set those to display = "none";

This might hide the actions in the UI, but all the requests would still be open to a malicious user.

I'm going to close this issue since I don't really plan to go into this direction. For public sharing, there's the "share" functionality, but it has functional limitations. I don't plan to make a read-only version of the full app, mainly because of security considerations (large attack surface).

@zadam zadam closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants