From 8130192518100d108036cfcfdd9d597e0d282339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 15 Oct 2020 18:04:34 +0200 Subject: [PATCH 1/2] Enable "poll" command only for moderators in installation instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "poll" command makes possible to create new polls as well as close the current poll, no matter which user created it. Therefore, it is best suited as a command available only to moderators of the conversation (but it can be made available to users too if needed; this only changes the recommended way to configure it). Signed-off-by: Daniel Calviño Sánchez --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df6e638..141bdfa 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,6 @@ Poll: Do you like polls? 1. Install the app 2. Setup the commands (you need to use your full path to occ, also don't use `sudo -u www-data` inside the command, because it is automatically run as www-data): ``` - sudo -u www-data /var/www/nextcloud/occ talk:command:add poll Poll '/var/www/nextcloud/occ talk:poll {ROOM} {USER} {ARGUMENTS}' 2 3 + sudo -u www-data /var/www/nextcloud/occ talk:command:add poll Poll '/var/www/nextcloud/occ talk:poll {ROOM} {USER} {ARGUMENTS}' 2 1 sudo -u www-data /var/www/nextcloud/occ talk:command:add vote Poll '/var/www/nextcloud/occ talk:poll:vote {ROOM} {USER} {ARGUMENTS}' 2 3 ``` From df964a3c3fc96ff45731c1df758fe81ea84449a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 15 Oct 2020 18:05:12 +0200 Subject: [PATCH 2/2] Do not provide hint to close poll on generic voting results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The voting results may be shown to participants who can not close the poll. Participants who can use the "poll" command can check how to use it with "/help poll", so the hint is no longer shown in the generic voting results. Signed-off-by: Daniel Calviño Sánchez --- lib/Command/Base.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/Command/Base.php b/lib/Command/Base.php index 0240e49..41736cf 100644 --- a/lib/Command/Base.php +++ b/lib/Command/Base.php @@ -57,8 +57,6 @@ public function showPoll(OutputInterface $output, \OCA\TalkSimplePoll\Model\Poll } - $output->writeln(''); - $output->writeln('/poll close - Close the voting and show results'); return; }