anon users are now allowed in admin endpoints
This commit is contained in:
parent
404393859b
commit
b525f09487
@ -9,17 +9,17 @@ admin_blueprint = Blueprint("admin_blueprint", __name__)
|
|||||||
|
|
||||||
|
|
||||||
class ServerSettingsAPI(ModelAPI):
|
class ServerSettingsAPI(ModelAPI):
|
||||||
@auth_required(required_permissions=(Permissions.ADMIN,))
|
@auth_required(required_permissions=(Permissions.ADMIN,), allow_anonymous=True)
|
||||||
def get(self, auth_user=None):
|
def get(self, auth_user=None):
|
||||||
settings = get_settings()
|
settings = get_settings()
|
||||||
return super().get(settings)
|
return super().get(settings)
|
||||||
|
|
||||||
@auth_required(required_permissions=(Permissions.ADMIN,))
|
@auth_required(required_permissions=(Permissions.ADMIN,), allow_anonymous=True)
|
||||||
def patch(self, auth_user=None):
|
def patch(self, auth_user=None):
|
||||||
settings = get_settings()
|
settings = get_settings()
|
||||||
return super().patch(settings)
|
return super().patch(settings)
|
||||||
|
|
||||||
@auth_required(required_permissions=(Permissions.ADMIN,))
|
@auth_required(required_permissions=(Permissions.ADMIN,), allow_anonymous=True)
|
||||||
def put(self, auth_user=None):
|
def put(self, auth_user=None):
|
||||||
settings = get_settings()
|
settings = get_settings()
|
||||||
return super().put(settings)
|
return super().put(settings)
|
||||||
|
@ -197,12 +197,12 @@ users_blueprint.add_url_rule(
|
|||||||
|
|
||||||
|
|
||||||
class UserListAPI(ModelListAPI):
|
class UserListAPI(ModelListAPI):
|
||||||
@auth_required(required_permissions=(Permissions.ADMIN,))
|
@auth_required(required_permissions=(Permissions.ADMIN,), allow_anonymous=True)
|
||||||
def post(self, auth_user=None):
|
def post(self, auth_user=None):
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
return super().post(User, data)
|
return super().post(User, data)
|
||||||
|
|
||||||
@auth_required(required_permissions=(Permissions.ADMIN,))
|
@auth_required(required_permissions=(Permissions.ADMIN,), allow_anonymous=True)
|
||||||
def get(self, auth_user=None):
|
def get(self, auth_user=None):
|
||||||
return super().get(User)
|
return super().get(User)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user