Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication #1

Open
MattArnold opened this issue Oct 19, 2015 · 0 comments
Open

Authentication #1

MattArnold opened this issue Oct 19, 2015 · 0 comments

Comments

@MattArnold
Copy link
Owner

Only show the site to those who log in with a Google authentication. We are fortunate that we only have to authenticate a specified whitelist of users who are selected by the Head of Programming (our admin user) to do work for Penguicon.

A user's email will always be a Penguicon email address (which is a GMail address) such as tech @penguicon.org. Therefore, Google sign-in should (we hope) work for all users. https://developers.google.com/identity/sign-in/web/build-button

The front of the email address serves as a track name, and the user's username. Email = username = track name.

There will be one user who is an exception, programming @penguicon.org, who is the admin user and not associated with any particular track.

Implementation

On all routes, implement the @login_required decorator from the Flask-Login extension

from flask.ext.login import login_required

Then route ('/') to view whichever track is coordinated by the logged-in user. Examples:

I log in as tech @penguicon.org: '/' -> '/tech' I see the list of Tech track events.

I log in as something which does not correspond to a track, such as programming @penguicon.org: '/' -> '/admin' which is an administration page. If it is not a Penguicon email address, deny access to the site, and route the user to a page which gives plentiful contact information with which to get help.

Each user, having logged in, may then use the navigation to surf to any page they wish. The above routing only determines their default homepage, in order to show them what is most relevant to their responsibilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant