Dropped authorized page

This commit is contained in:
Key Networks 2018-01-31 11:25:45 +08:00
parent 83f0bb781a
commit c901d27ab1
3 changed files with 0 additions and 54 deletions

View File

@ -446,26 +446,6 @@ exports.member_object = async function(req, res) {
}
}
// Member authorized POST
exports.member_authorized = async function(req, res) {
const nav =
{
active: 'networks',
whence: ''
}
const authorized = { authorized: req.body.authorized };
try {
const network = await zt.network_detail(req.params.nwid);
const member = await zt.member_object(req.params.nwid, req.params.id, authorized);
nav.whence = '/controller/network/' + network.nwid + '/members';
res.render('authorized', {title: 'authorized', nav: nav, network: network, member: member});
} catch (err) {
res.render('authorized', {title: 'authorized', nav: nav, error: 'Error authorizing member ' + req.params.id + ' on network ' + req.params.nwid + ': ' + err});
}
}
// Easy network setup GET
exports.easy_get = async function(req, res) {
const nav =

View File

@ -58,9 +58,6 @@ router.post('/network/:nwid/member/:id/delete', restrict, networkController.memb
// GET request for any member object
router.get('/network/:nwid/member/:id/:object', restrict, networkController.member_object);
// POST request for member authorized
router.post('/network/:nwid/member/:id/authorized', restrict, networkController.member_authorized);
// GET request for member detail
router.get('/network/:nwid/member/:id', restrict, networkController.member_detail);

View File

@ -1,31 +0,0 @@
//-
ztncui - ZeroTier network controller UI
Copyright (C) 2017-2018 Key Networks (https://key-networks.com)
Licensed under GPLv3 - see LICENSE for details.
extends network_layout
block net_content
h4 for member
a(href='../' + member.address) #{member.address}
form(method='POST' action='')
.radio
label
input(type='radio' name='authorized' value='true' checked=member.authorized)
| Yes
.radio
label
input(type='radio' name='authorized' value='false' checked=!member.authorized)
| No
.form-group(style='padding-top: 10px')
button.btn.btn-primary(type='submit') Submit
= ' '
a.btn.btn-default(href='../' + member.address name='cancel' role='button') Cancel
if errors
ul
for err in errors
li!= err.msg