From 37fe3f84ac350c54c32369e3a044eae45400e983 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 1 Mar 2012 19:57:13 +0000 Subject: [PATCH] Check for the required permissions --- script/noosfero-plugins | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/script/noosfero-plugins b/script/noosfero-plugins index f60c755..e10e804 100755 --- a/script/noosfero-plugins +++ b/script/noosfero-plugins @@ -155,6 +155,17 @@ if [ -z "$command" ]; then exit 1 fi shift + + +case "$command" in + enableall|disableall|enable|disable|new) + if [ ! -w "$enabled_plugins_dir" ]; then + echo "E: sorry, you don't have the required permissions to manage plugins" + exit 2 + fi + ;; +esac + case "$command" in list|status|usage|enableall|disableall) if [ ! -z "$1" ]; then -- libgit2 0.21.2