问题描述:

I'm trying to learn the best way to control the data a user sees within an application.

As an example I've set up a database that has a table for a bunch of parks that each have separate fields

DBSchema

  • Now I will have multiple users using this application
  • I don't want them to be able to see all of the parks available
  • I will manually create users and select which fields they see, this

    will be the only way to get an account.

What is best practice when dealing with this situation? How should I set up the users table in the database in a way I can control what parks are visible to them?

I am currently exploring some possible solutions

  • Send a pre packaged SQLite DB with the application, and use HTTP Post

    calls to alter the DB depending on which user signs in.

  • Store the entire SQLite DB on the server and make a call to it when a user first signs in.

I am somewhat stuck with my development at the moment because I don't know how to handle this.

The applications functionality is complete in its current state, having multiple users see something different from the same database is something I have never done and should really know.

Any tips on what I should be researching or general guidelines for this would be great.

相关阅读:
Top