pigallery2 icon indicating copy to clipboard operation
pigallery2 copied to clipboard

Support for faces via shared links

Open Wdavery opened this issue 3 years ago • 4 comments

This may end up being negated by #188, but currently guests using a shared link to access the library cannot use the Faces tab.

Is it possible to enable this? Or is this a limitation of how shared folders are implemented? I imagine we are bound by the same permissions of #188.

Ultimately I'm looking for a way to allow users to browse a subset of the library and also use the faces functionality. If user permissions is the best way to achieve that I can close this issue.

Wdavery avatar Apr 21 '21 20:04 Wdavery

Hi,

This feature is very far from what the gallery is capable of today.

There are these tables (plus some more):

  • faces (containing all names) <-- this is shown on the faces tab
  • photos (listing all photos, with a foreign key to a directory)
  • faces <-> photos switching table
  • directories <-- this is what you can share

Not sure what would happen if the faces tab would be rendered based on the directory that one can look at. I assume a really O(minutes) loading time.

Sorry I only have limited time for playing our with this app, and this feature does not align with my plans. I can give some pointers if you would like to give it a try.

bpatrik avatar Apr 21 '21 20:04 bpatrik

Totally reasonable. A lot of complexity for this feature definitely. Just wanted to get some idea of scope. I may take a look at it as I familiarize myself a bit more with the app.

Not sure if this is a possible route but could you generate a custom {share}faces table at link creation?

Wdavery avatar Apr 21 '21 21:04 Wdavery

I would rather try and check how slow would it be to list the faces on the fly from the available photos in: https://github.com/bpatrik/pigallery2/blob/90a6c4b6b1d2a2e22411288ad5e2613fc62de38a/src/backend/model/database/sql/PersonManager.ts#L34-L49

It is not possible to enable faces tab for shared link (limited guest), but not for guest (practically a non existing role), because that would mess up the user rights: https://github.com/bpatrik/pigallery2/blob/master/USERRIGHTS.md A user should have all the rights that the other with lower Id have.

bpatrik avatar Apr 21 '21 21:04 bpatrik

Thanks for your insight, I'll check that out!

Wdavery avatar Apr 21 '21 21:04 Wdavery