From eec22f39abbfc37b5d12c951b97edaeffefc72e9 Mon Sep 17 00:00:00 2001 From: Conrad Date: Mon, 2 Oct 2017 14:52:30 -0400 Subject: [PATCH 1/2] Change the building endpoint to be just auth need --- app/views/building.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/building.py b/app/views/building.py index 15fc763..f10d230 100644 --- a/app/views/building.py +++ b/app/views/building.py @@ -2,10 +2,13 @@ from flask import request from werkzeug.exceptions import MethodNotAllowed from ..controllers.building import BuildingController -from .base import RestView +from .base import UnprotectedRestView +from app.permissions.auth import auth_need -class BuildingView(RestView): +class BuildingView(UnprotectedRestView): + decorators = (auth_need,) + """The building view.""" def get_controller(self): """Return an instance of the building controller.""" -- GitLab From 8fa9f52a59996af6c6defd7a6376b9cbf771f1a3 Mon Sep 17 00:00:00 2001 From: Conrad Date: Mon, 2 Oct 2017 15:53:36 -0400 Subject: [PATCH 2/2] Import app_need from the correct place --- app/views/building.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/building.py b/app/views/building.py index f10d230..40387b8 100644 --- a/app/views/building.py +++ b/app/views/building.py @@ -3,11 +3,11 @@ from flask import request from werkzeug.exceptions import MethodNotAllowed from ..controllers.building import BuildingController from .base import UnprotectedRestView -from app.permissions.auth import auth_need +from app.permissions.application import app_need class BuildingView(UnprotectedRestView): - decorators = (auth_need,) + decorators = (app_need,) """The building view.""" def get_controller(self): -- GitLab