Skip to content

Commit 08e6911

Browse files
committed
fixed user editing projects
1 parent bce20cf commit 08e6911

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<name>Time Tracker</name>
66
<summary>Time Tracker App</summary>
77
<description><![CDATA[Time Tracker App]]></description>
8-
<version>0.0.21</version>
8+
<version>0.0.22</version>
99
<licence>agpl</licence>
1010
<author mail="[email protected]" >MTier Ltd.</author>
1111
<namespace>TimeTracker</namespace>

lib/Controller/AjaxController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,17 +423,17 @@ public function editProject($id) {
423423
$clientId = $this->request->clientId;
424424
$p->setClientId($clientId);
425425
}
426-
if (isset($this->request->locked)){
426+
if (isset($this->request->locked) && $this->isThisAdminUser()){
427427
$locked = $this->request->locked;
428428
$p->setLocked($locked);
429429
}
430430

431-
if (isset($this->request->allowedTags)){
431+
if (isset($this->request->allowedTags) && $this->isThisAdminUser()){
432432
$allowedTags = $this->request->allowedTags;
433433
$a = explode(',',$allowedTags);
434434
$this->tagMapper->allowedTags($id, $a);
435435
}
436-
if (isset($this->request->allowedUsers)){
436+
if (isset($this->request->allowedUsers) && $this->isThisAdminUser()){
437437
$allowedUsers = $this->request->allowedUsers;
438438
$a = explode(',',$allowedUsers);
439439
$this->userToProjectMapper->deleteAllForProject($id);

0 commit comments

Comments
 (0)