Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorraimund-schluessler <raimund.schluessler@googlemail.com>2014-05-27 22:29:38 +0400
committerraimund-schluessler <raimund.schluessler@googlemail.com>2014-05-27 22:29:38 +0400
commit3c5ab3ad57942d15af51a0041f93ab9bd7505966 (patch)
tree29d8cf7fe4b44c21340340fc7ea1c17713814527 /lib
parent62b8b9ca03dd9ba6b587287ef82b50a8fd30d65f (diff)
Fix to allow normal users to change visibility
Diffstat (limited to 'lib')
-rw-r--r--lib/controller/collectionscontroller.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/controller/collectionscontroller.php b/lib/controller/collectionscontroller.php
index 43da2b82..746dcb79 100644
--- a/lib/controller/collectionscontroller.php
+++ b/lib/controller/collectionscontroller.php
@@ -62,7 +62,7 @@ class CollectionsController extends Controller {
foreach ($collections as $key => $collection){
try{
$tmp = (int)\OCP\Config::getUserValue($this->api->getUserId(), 'tasks_enhanced','show_'.$collection['id']);
- if (!in_array($tmp, array(0,1,2))) {
+ if (!in_array($tmp, array(0,1,2) || $tmp==null)) {
$tmp = 2;
\OCP\Config::setUserValue($this->api->getUserId(), 'tasks_enhanced','show_'.$collection['id'],$tmp);
}
@@ -81,6 +81,9 @@ class CollectionsController extends Controller {
return $response;
}
+ /**
+ * @NoAdminRequired
+ */
public function setVisibility(){
$collectionId = (string) $this->params('collectionID');
$vis = (int) $this->params('visibility');