Piwigo / piwigo-openstreetmap

OpenStreetMap integration for Piwigo
http://piwigo.org/ext/extension_view.php?eid=701
GNU General Public License v3.0
35 stars 35 forks source link

Request: Permissions #171

Open boge90 opened 5 years ago

boge90 commented 5 years ago

Hi,

It would be a nice feature if the map would be only visible to a certain people. for example:

I really like having the map on my website, however I don't really want to share the exact GPS coordinates with the whole world, so I think a feature like this would become increasingly popular as time goes.

And also, thanks for creating this awesome plugin!

Schmidtze2 commented 5 years ago

Hi,

you could change the file category.inc.php from this

function osm_render_category() {
  global $template, $page, $conf, $filter;
  ...

to this

function osm_render_category() {
  global $template, $page, $conf, $filter, $user;
  if ($user['level'] != 2) { // or whatever
    return;
  }
  ...

Best regards Friedemann

boge90 commented 5 years ago

Thanks! will give that a try

vjanuario commented 1 year ago

Will this also prevent temporary folders created by the plugin from being visible by the general public? This is an incredible plugin, but has the security vulnerability that it creates pseudo-albums that do not follow the Permissions set on the main Locations album.

IntegrousFenceAndDeck commented 5 months ago

It would be great if there would be a drop down for this plug in to allow who as access to see the map rather then changing the code.