Commit 37fe3f84ac350c54c32369e3a044eae45400e983

Authored by Antonio Terceiro
1 parent 031467c4

Check for the required permissions

Showing 1 changed file with 11 additions and 0 deletions   Show diff stats
script/noosfero-plugins
... ... @@ -155,6 +155,17 @@ if [ -z "$command" ]; then
155 155 exit 1
156 156 fi
157 157 shift
  158 +
  159 +
  160 +case "$command" in
  161 + enableall|disableall|enable|disable|new)
  162 + if [ ! -w "$enabled_plugins_dir" ]; then
  163 + echo "E: sorry, you don't have the required permissions to manage plugins"
  164 + exit 2
  165 + fi
  166 + ;;
  167 +esac
  168 +
158 169 case "$command" in
159 170 list|status|usage|enableall|disableall)
160 171 if [ ! -z "$1" ]; then
... ...