diff --git a/CHANGELOG b/CHANGELOG index ba5bcd32..211f26a1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +=== v0.1.65 === + === v0.1.64 === - Improve logging for upgrades - Remove LND Admin diff --git a/rootfs/standard/var/www/mynode/lnd.py b/rootfs/standard/var/www/mynode/lnd.py index 42ec5aa7..574fc0eb 100644 --- a/rootfs/standard/var/www/mynode/lnd.py +++ b/rootfs/standard/var/www/mynode/lnd.py @@ -129,19 +129,20 @@ def lnd_tls_cert(): check_logged_in() return send_from_directory(directory="/mnt/hdd/mynode/lnd/", filename="tls.cert") -@mynode_lnd.route("/lnd/admin.macaroon", methods=["POST"]) -def lnd_macaroon(): +@mynode_lnd.route("/lnd/admin.macaroon") +def lnd_admin_macaroon(): check_logged_in() - p = pam.pam() - pw = request.form.get('password_download_macaroon') - if pw == None or p.authenticate("admin", pw) == False: - flash("Invalid Password", category="error") - return redirect(url_for(".page_lnd")) - # Download macaroon return send_from_directory(directory="/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/", filename="admin.macaroon") +@mynode_lnd.route("/lnd/readonly.macaroon") +def lnd_readonly_macaroon(): + check_logged_in() + + # Download macaroon + return send_from_directory(directory="/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/", filename="readonly.macaroon") + @mynode_lnd.route("/lnd/channel.backup") def lnd_channel_backup(): check_logged_in() diff --git a/rootfs/standard/var/www/mynode/templates/lnd.html b/rootfs/standard/var/www/mynode/templates/lnd.html index c764a547..e6c23ac5 100644 --- a/rootfs/standard/var/www/mynode/templates/lnd.html +++ b/rootfs/standard/var/www/mynode/templates/lnd.html @@ -8,34 +8,6 @@ $(document).ready(function() { alias="{{alias}}" - - function downloadMacaroon() { - $("#download_macaroon_form").submit(); - download_macaroon_dialog.dialog( "close" ); - } - download_macaroon_dialog = $( "#download-macaroon-dialog" ).dialog({ - autoOpen: false, - resizable: false, - height: "auto", - width: 600, - modal: true, - position: { my: "center top", at: "center top", of: window, collision: "none" }, - buttons: { - "Download": downloadMacaroon, - Cancel: function() { - download_macaroon_dialog.dialog( "close" ); - } - }, - open: function() { - $("#password_download_macaroon").val("") - } - }); - $("#download_macaroon").on("click", function() { - download_macaroon_dialog.dialog( "open" ); - }); - $("#download_macaroon_form").on("submit", function() { - download_macaroon_dialog.dialog( "close" ); - }); function change_alias() { $("#change_alias_form").submit(); @@ -163,7 +135,13 @@
Admin Macaroon
- download + download +
+
+
+
Read Only Macaroon
+
+ download
{% endif %} @@ -274,20 +252,6 @@ {% endif %} - -