Allow transfer of single boards

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2022-03-14 09:47:46 +01:00
parent b774090032
commit a45e46f80a
8 changed files with 114 additions and 39 deletions

View File

@@ -153,7 +153,7 @@ class AssignmentMapper extends QBMapper implements IPermissionMapper {
* @param $newOwnerId
* @return void
*/
public function transferOwnership(string $ownerId, string $newOwnerId) {
public function transferOwnership(string $ownerId, string $newOwnerId, int $boardId = null) {
$params = [
'owner' => $ownerId,
'newOwner' => $newOwnerId,
@@ -164,7 +164,7 @@ class AssignmentMapper extends QBMapper implements IPermissionMapper {
(SELECT id FROM `*PREFIX*{$this->tableName}` WHERE `participant` = :owner)";
$stmt = $this->db->executeQuery($sql, $params);
$stmt->closeCursor();
$sql = "UPDATE `*PREFIX*{$this->tableName}` SET `participant` = :newOwner WHERE `participant` = :owner AND `type`= :type";
$stmt = $this->db->executeQuery($sql, $params);
$stmt->closeCursor();