From bfdab365e661577e96ced3c226a63244aa50609f Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 6 May 2011 13:33:58 -0500 Subject: Bugfix 7059 These commands weren't specified in the bug but they needed the same check --- templates/delete/file/node.tag/node.def | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'templates/delete') diff --git a/templates/delete/file/node.tag/node.def b/templates/delete/file/node.tag/node.def index 715ba48..0faf383 100644 --- a/templates/delete/file/node.tag/node.def +++ b/templates/delete/file/node.tag/node.def @@ -1,4 +1,10 @@ help: Delete files in the specified directory comptype: imagefiles allowed: echo -n "" -run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --delete=$3 +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + sudo ${vyatta_sbindir}/vyatta-image-tools.pl --delete=$3 + else + echo Must be an admin user to run this command. + fi + -- cgit v1.2.3