alejcas / gae-rbac

Role-Based Access Control for Google App Engine
3 stars 2 forks source link

Integrating with webapp2.auth #3

Open vivekrc opened 6 years ago

vivekrc commented 6 years ago

Hi Janscas, I'm trying to integrate your code with the following: https://www.abahgat.com/blog/user-authentication-with-webapp2-on-google-app-engine/

Can you give some ideas about how to go about it? I'm fairly new to the backend and having a tough time figuring this out.

alejcas commented 6 years ago

this Rbac module is completely independent of the authentication. First comes the authentication and then comes the Rbac check.

Just implement the authentication and then implement the rbac modele. Just follow the instructions. Define a rbac property inside your base handler, etc..

You can access the rbac from each handler. If the user could not authenticate the rbac code will never be executed.