diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-05-06 13:27:22 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-05-06 13:27:22 -0500 |
commit | 86a7354d70cf53fe8f284b9f300507d5f90e298a (patch) | |
tree | 00d51e61960d50dfadc73930c0ee248329b1883c | |
parent | 192e1a1e2e130401ae5c69351f97711487aaa13d (diff) | |
download | vyatta-op-86a7354d70cf53fe8f284b9f300507d5f90e298a.tar.gz vyatta-op-86a7354d70cf53fe8f284b9f300507d5f90e298a.zip |
Bugfix: 7059 Make it such that show file prints a proper error when run as an operator user.
-rw-r--r-- | templates/show/file/node.tag/node.def | 8 |
1 files changed, 7 insertions, 1 deletions
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 "<imagefiles>" -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 + |