nextcloud / maps

🌍🌏🌎 The whole world fits inside your cloud!
https://apps.nextcloud.com/apps/maps
GNU Affero General Public License v3.0
490 stars 88 forks source link

Limit to groups #170

Open GMo7944 opened 4 years ago

GMo7944 commented 4 years ago

Hello I want that only some users can use maps. Then I tried to use the "Limit to groups" fonctionnality.

But it disappeared. I'm pretty sure I saw it at the firt installation but now impossible to see it. I uninstall, reinstall => nothing.

Is there a trick ?

I'm running the 16.0.4

Also : thank you for your work.

julien-nc commented 4 years ago

Well I can't see "limit to groups" for Maps app neither. I don't know why :smile: because it appears for my other NC apps.

@juliushaertl @nickvergessen @rullzer Do you have a clue about a potential reason why Maps app can't be limited to groups?

nickvergessen commented 4 years ago

https://github.com/nextcloud/maps/blob/master/appinfo/info.xml#L57

It is due to the type filesystem. I think that is wrong in general and we need a different solution. But i guess this is because the app needs to be loaded on dav requests, so it can index the locations of images and gson files?

julien-nc commented 4 years ago

@nickvergessen Thanks for your answer. Yep, the type filesystem is needed to make file hooks work (dav or not).

I think that is wrong in general and we need a different solution.

I guess you somehow mean there must be a way to express that an app manipulates the filesystem but still be able to make group limitations and other stuff.

Well @GMo7944 it seems group limitations are not going to be possible soon. Sorry.

nickvergessen commented 4 years ago

I guess you somehow mean there must be a way to express that an app manipulates the filesystem but still be able to make group limitations and other stuff.

Yes. We need to find a solution, so hooks are still/always triggered, but the UI is not accessible. I had the same problem with quite some other apps already

szaimen commented 4 years ago

I would also really like to see this feature :)

Thatoo commented 1 year ago
  1. disabled maps
  2. removed the following lines in maps/appinfo/info.xml <types> <filesystem/> </types>
  3. enabled maps

@eneiluj do you know if that has any bad side effects?

Originally posted by @szaimen in https://github.com/nextcloud/maps/issues/507#issuecomment-759107729

Thatoo commented 1 year ago

This trick does work pn Nextcloud 25 with last version of Maps

tacruc commented 1 year ago

@Thatoo did you check, that the filesystem Hooks are still executed correctly?

Thatoo commented 1 year ago

No. How can I do that?

tacruc commented 1 year ago

It's a little tricky or requires some time. Can you access the database? If yes:

  1. Check the OC_jobs tables for maps jobs (something like AddPhotoJob)
  2. Upload Images, some e.g. jpg a. Via Webfrontend b. Via DAV client (e.g. desktop client or Android client)
  3. Check that new AddPhotoJob for all uploaded jpg are created.

If no: Do 1-3, you will have to execute the cron.php until the photos are visible on the map. (might take multiple executions of cron.php).

If this is too complated, there is some other hope, to get this fixed but it might take a while. There is now a metadata store for NC server, which extracts metadata such as locations. I plan to migrate the photos backend to this, but I cannot promise a time schedule.

nickvergessen commented 1 year ago

do you know if that has any bad side effects?

App might be skipped in webdav and therefor not get events to index new photos (as tacruc already points out).

tacruc commented 1 year ago

@nickvergessen do you know what this might is dependent on?

Is it either skipped or not skipped, or might it be skipped in some environments and not skipped in other environments? Or even worse might it be skipped sometimes on the same env?

I'm just woundering if it is sufficent to test once if it is skipped, do we have to test it one on all NC version, or do we have to test once on all possible enviroments (db, chaching, operating system, arichtecture ...)

tacruc commented 1 year ago

Anyhow I think the best solution for this and many other images is to replace the photo backend, by a dav search for images with geolocation. (which should be possible in NC25 or NC26.

nickvergessen commented 1 year ago

Is it either skipped or not skipped, or might it be skipped in some environments and not skipped in other environments? Or even worse might it be skipped sometimes on the same env?

I would need to dive into more code I don't have in my brain atm to answer this. But we load some apps based on types, etc.

Also note that when maps is not enabled for user A, and they upload a photos to a folder shared from user B, the maps app would not be loaded for user A and therefor not follow the photo upload, although user B might expect that.