zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.52k stars 1.88k forks source link

Disable Delete Option #3345

Closed passionate2023 closed 1 year ago

passionate2023 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

sigaloid commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

passionate2023 commented 1 year ago

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

passionate2023 commented 1 year ago

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

sottey commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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).