immich
immich copied to clipboard
Feature: Read-only property for External Libraries
Closes #5449. Original thread .
This PR adds "Read Only" property for External library.
In database it stored as column "libraries.isReadOnly". This property set at library creation time and can't be modified. Asset.isReadOnly inherits library's value at creation time. At frontend it was added as toggle to "Select library owner" dialog. Mobile app doesn't require changes.
Asset modification and deletion require to check only isReadOnly property, isExternal becomes only informational.
Tested:
- delete to trash
- empty trash
- modification
- rescan of library
TODO:
- automated tests
- indication of ReadOnly property in web/mobile
- ? cmdline tool to migrate library to RW mode and back
Thanks, that's what I need most about this feature, otherwise I wouldn't even know how to do my job!
Thanks! I discussed this PR with the other maintainers and we're happy with it overall, but adding that additional server-side check would be a blocker. Then I think the only other change needed would be some updates to the tests
TODO: indication of ReadOnly property in web/mobile
I believe we already have some indications such as delete being disabled for readonly assets
? cmdline tool to migrate library to RW mode and back
Probably better to make the readonly property modifiable in the UI rather than a cmdline tool, but that's probably better as a separate PR. I think this is fine for now
Thanks for keeping an eye on this feature, we're excited to see it coming soon!
#8943 seems more complete
@jrasm91 in what way does it seem more complete?
Both look to be doing essentially the same thing. The other PR was created first, has some tests, and allows the property to be updated after the library is created.
@benmccann
I've added server-side checks to update and updateAll.
Also added library's isReadOnly indication using alternative icon for read-write libs:
Hey, thanks for working on this and sorry for the confusion/back and forth around this topic. Internally we have had a lot of discussions about the direction we want to take external libraries. Long story short, we decided to go ahead with the implementation laid out in #9235.
This is good news, for me it’s much better that the team took it upon themselves. Thanks! I was glad to help.