Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
71a3413cbe
|
|||
|
a1dadcd709
|
|||
|
b9fd722016
|
@@ -31,7 +31,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="no-sort">
|
<td class="no-sort">
|
||||||
<span data-toggle="tooltip" data-placement="right" title="delete">
|
<span data-toggle="tooltip" data-placement="right" title="delete">
|
||||||
<a class="nodeco" href="/user/{{user.name}}/delete">
|
<a class="nodeco" href="{{ url_for('rest.deleteUser', userName=user.name) }}">
|
||||||
<i class="fas fa-trash"></i>
|
<i class="fas fa-trash"></i>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -64,8 +64,11 @@ def deleteNode(nodeId: int):
|
|||||||
|
|
||||||
|
|
||||||
@rest_blueprint.route('/node/<int:nodeId>/rename/<newName>', methods=['GET'])
|
@rest_blueprint.route('/node/<int:nodeId>/rename/<newName>', methods=['GET'])
|
||||||
@auth.authorize_admins('default')
|
@auth.access_control('default')
|
||||||
def renameNode(nodeId: int, newName: str):
|
def renameNode(nodeId: int, newName: str):
|
||||||
|
node = Node().get(nodeId)
|
||||||
|
if not auth.userOrAdmin(node.user.name):
|
||||||
|
return auth.unathorized
|
||||||
Node().rename(nodeId, newName)
|
Node().rename(nodeId, newName)
|
||||||
return jsonify(dict(newName=newName))
|
return jsonify(dict(newName=newName))
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ preload_app = True
|
|||||||
|
|
||||||
# logconfig = "app/logging/production.ini"
|
# logconfig = "app/logging/production.ini"
|
||||||
logconfig = "app/logging/production.ini"
|
logconfig = "app/logging/production.ini"
|
||||||
access_log_format = "%(h)s %(l)s %(t)s %(r)s %(s)s %(b)s %(f)s %(a)s"
|
access_log_format = "%(h)s %({x-forwarded-for}i)s %(t)s %(r)s %(s)s %(b)s %(L)s"
|
||||||
# Log to stdout.
|
# Log to stdout.
|
||||||
accesslog = "-"
|
accesslog = "-"
|
||||||
errorlog = "-"
|
errorlog = "-"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "hsman"
|
name = "hsman"
|
||||||
version = "0.9.9"
|
version = "0.9.12"
|
||||||
description = "Flask Admin webui for Headscale"
|
description = "Flask Admin webui for Headscale"
|
||||||
authors = ["Andrea Mistrali <andrea@mistrali.pw>"]
|
authors = ["Andrea Mistrali <andrea@mistrali.pw>"]
|
||||||
license = "BSD"
|
license = "BSD"
|
||||||
|
|||||||
Reference in New Issue
Block a user