Check permissions in frontend
This commit is contained in:
@@ -26,17 +26,17 @@ namespace OCA\Deck\Db;
|
||||
|
||||
|
||||
use OCP\IDb;
|
||||
use OCP\IDBConnection;
|
||||
|
||||
|
||||
class AclMapper extends DeckMapper implements IPermissionMapper {
|
||||
|
||||
public function __construct(IDb $db) {
|
||||
public function __construct(IDBConnection $db) {
|
||||
parent::__construct($db, 'deck_board_acl', '\OCA\Deck\Db\Acl');
|
||||
}
|
||||
|
||||
public function findAll($boardId, $limit=null, $offset=null) {
|
||||
$sql = 'SELECT id, board_id, type, participant, permission_write, permission_invite, permission_manage FROM `*PREFIX*deck_board_acl` WHERE `board_id` = ? ';
|
||||
//'UNION SELECT 0, id, \'user\', owner, 1, 1, 1, 1 FROM `*PREFIX*deck_boards` WHERE `id` = ? ';
|
||||
return $this->findEntities($sql, [$boardId], $limit, $offset);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
namespace OCA\Deck\Db;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
use OCP\IDb;
|
||||
|
||||
|
||||
@@ -38,7 +37,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
|
||||
return $this->findEntities($sql, [$boardId], $limit, $offset);
|
||||
}
|
||||
|
||||
public function delete(Entity $entity) {
|
||||
public function delete(\OCP\AppFramework\Db\Entity $entity) {
|
||||
// delete assigned labels
|
||||
$this->deleteLabelAssignments($entity->getId());
|
||||
// delete label
|
||||
|
||||
Reference in New Issue
Block a user