3

I want to build a site using Django and have a user authentication system. In that site I want to serve maps and other data, but not to all users.

What I am interested in is: can I give the maps some viewing permissions? I could build maps with Geoserver and OpenLayers, I just don't know how to serve them for each user.

Expected behavior: Have some maps (WMS, GeoJson features etc.) and a user with some permissions. Logged in he should see a few of those maps (as for his permissions). If he logs out he shouldn't see the map (by visiting a url or something similar). If his permissions are revoked he can no longer see maps.

Can this be done using Django and Geoserver (or other map service solution)? What should I start learning?

  • Hi. I hope you found answers because I am facing exactly the same problem : I have a PostGIS database with data (GIS layers) I want to publish to the web but with a user control (checking who is allowed to see what, but also logging who sees what). I would like to do that with Django has it offers "out-of-the-box" many features I need. Have you succeeded ? – Darth Kangooroo May 26 '20 at 20:12
0

I will answer my own question, specially for @DarthKangooroo comment.

It's been a long time and I've moved away from GIS since then. I am now just a basic web developer. I can't remember well my scenario back then but from the experience I accumulated over the years:

  • Django is a backend framework, it stands between the browser and whatever data sources we have (database, Geosever API, static files etc).
  • you will have to learn how to use it but Django is great for beginners as it comes with functionality including users, administrators, authentication and permissions.

That's a generalization but it's true. You will need to follow a basic Django tutorial and in end you will be able to create:

  • users with authentication and permissions
  • views(pages) that use Geoserver data and have restrictions (ex: only for logged in users, only for 'admin' users etc).

I did a quick google search and it looks like Django is well adopted by the GIS community. good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.