OpenDataServices / json-data-ferret

https://json-data-ferret.readthedocs.io/en/latest/
MIT License
1 stars 0 forks source link

Django user permissions #9

Open odscjames opened 4 years ago

odscjames commented 4 years ago

So only some users can access each admin UI (core app and example app, different permission for both)

aayushi-droid commented 4 years ago

Yes you can give permission to specific used based on their Email account. Like Give All accress if user.email.endswith("@example.com") I am also working on same soon.

odscjames commented 4 years ago

Thanks, but I was intending to use https://docs.djangoproject.com/en/3.0/topics/auth/default/#the-permission-required-decorator

@permission_required('polls.add_choice')

That gives us more fine grained control on granting access to individual users. We don't have many users (at least to start with) so we don't need a rule based approach.

odscjames commented 4 years ago

Done for main app, maybe do for example app later