Read only policy support

This commit is contained in:
2024-10-04 12:58:40 +02:00
parent 379fef4b00
commit 9b7b903c57
13 changed files with 544 additions and 274 deletions

View File

@ -11,7 +11,7 @@ from app import auth
from flask import jsonify
from flask_pyoidc.user_session import UserSession
from hsapi_client import Node, User, Route, PreAuthKey
from hsapi_client import Node, User, Route, PreAuthKey, Policy
from hsapi_client.preauthkeys import v1ListPreAuthKeyRequest
@ -130,3 +130,11 @@ def routes():
return render_template("routes.html",
exitNodes=exitNodes,
routes=final)
@main_blueprint.route('/policy', methods=['GET'])
@auth.authorize_admins('default')
def policy():
policy = Policy().get()
return render_template("policy.html",
policy=policy)