Example application

Simple example

Run the Redis server.

Run example development server:

$ pip install -e .[all]
$ cd examples
$ export FLASK_APP=app.py
$ ./app-setup.sh
$ ./app-fixtures.sh

Run example development server:

$ flask run --debugger -p 5000

View some records in your browser:

http://localhost:5000/records/1
http://localhost:5000/records/2
http://localhost:5000/records/3
http://localhost:5000/records/4
http://localhost:5000/records/5
http://localhost:5000/records/6
http://localhost:5000/records/7
http://localhost:5000/records/8

To be able to uninstall the example app:

$ ./app-teardown.sh

With permission support

Run the Redis server.

Run the the example development server:

$ pip install -e .[all]
$ cd examples
$ export FLASK_APP=permsapp.py
$ ./app-setup.sh
$ ./app-fixtures.sh

Run example development server:

$ flask run --debugger -p 5000

Try to view record 1:

http://localhost:5000/records/1

Open the record 1:

Try now to open the record 2:

As you can see, for this user the action is forbidden.

To be able to uninstall the example app:

$ ./app-teardown.sh