maps icon indicating copy to clipboard operation
maps copied to clipboard

Limit to groups

Open GMo7944 opened this issue 6 years ago • 14 comments

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.

GMo7944 avatar Sep 25 '19 17:09 GMo7944

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?

julien-nc avatar Oct 06 '19 11:10 julien-nc

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?

nickvergessen avatar Oct 06 '19 12:10 nickvergessen

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

julien-nc avatar Oct 06 '19 13:10 julien-nc

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

nickvergessen avatar Oct 06 '19 14:10 nickvergessen

I would also really like to see this feature :)

szaimen avatar Mar 07 '20 12:03 szaimen

  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 avatar Feb 16 '23 09:02 Thatoo

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

Thatoo avatar Feb 16 '23 09:02 Thatoo

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

tacruc avatar Feb 16 '23 12:02 tacruc

No. How can I do that?

Thatoo avatar Feb 16 '23 13:02 Thatoo

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.

tacruc avatar Feb 16 '23 13:02 tacruc

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

nickvergessen avatar Feb 16 '23 14:02 nickvergessen

@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 avatar Feb 16 '23 14:02 tacruc

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.

tacruc avatar Feb 16 '23 14:02 tacruc

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.

nickvergessen avatar Feb 16 '23 14:02 nickvergessen