Use ScriptHandler::setPermissions()