From 86a7354d70cf53fe8f284b9f300507d5f90e298a Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 6 May 2011 13:27:22 -0500 Subject: Bugfix: 7059 Make it such that show file prints a proper error when run as an operator user. --- templates/show/file/node.tag/node.def | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/show/file/node.tag/node.def b/templates/show/file/node.tag/node.def index 7e205da..8d3eb32 100644 --- a/templates/show/file/node.tag/node.def +++ b/templates/show/file/node.tag/node.def @@ -1,4 +1,10 @@ help: Show files in the specified directory comptype: imagefiles allowed: echo -n "" -run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --show=$3 +run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ]; + then + sudo ${vyatta_sbindir}/vyatta-image-tools.pl --show=$3 + else + echo Must be an admin user to run this command. + fi + -- cgit v1.2.3