gae-init/gae-init — pull request #149 by joernhees (2014-04-12 23:35:14+00:00)
Title: decoration time order checking for auth decorators like admin_required

If you sloppily added an `@auth.admin_required` decorator above the
`@app.route(...)` lines you would notice that the permission is not
checked.

The reason for this is that the `@app.route(...)` decorator registers
the view function as is "from bottom up to the route decorator and not
further" in `app.view_functions`.

This commit introduces checks which are performed once at decoration
time to check if the passed in function is already part of the
`app.view_functions` and the permission logic would be skipped.
If this is the case a SyntaxError is raised notifying the developer.