Jump to content

Delete function to be made more secure


Recommended Posts

xbmcgotham
Posted

Hi,

 

The delete function is a nice to have feature, however its also a dangerous one as it allows for making easy deletions with no way of restoring the deleted content. Accidents do happen.

 

I like to propose a small addition of code to the current delete function that will allow for the following:

 

1. If you as user have the delete functions rights, you can only "mark" a file/folder for deletion through any connected interface. You are not able to directly delete the original file/folder at all.

2. Once this file is marked for deletion in the DB, it will be removed from the media library however the original file/folder stays untouched.

3. The admin can see the marked deleted files in a separate tab on the web interface and will be able to fully delete it or restore it all done manually.

 

This is an easy and quick implementation that would make it saver to keep files/folders from accidentally being erased.

 

Thanks

  • Like 2
andyblac644
Posted

or easier would be simply move the file to a folder `.Trash` where the library is located.

  • Like 1
xbmcgotham
Posted

Yes, is also an option, thanks for thinking about it.

 

I do think that if choosing between a DB value change or copying a big video file to .trash, I would go for DB value change as this would not have so much effecting the bandwidth of the network. Assuming the .trash is located on the Emby server and not on the NAS drive. :-)

andyblac644
Posted

Yes, is also an option, thanks for thinking about it.

 

I do think that if choosing between a DB value change or copying a big video file to .trash, I would go for DB value change as this would not have so much effecting the bandwidth of the network. Assuming the .trash is located on the Emby server and not on the NAS drive. :-)

 

 

as long as .Trash is on the same drive / mount there would be no bandwidth, as it is just moving the file.

xbmcgotham
Posted

Yes, that is correct. :-)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...