Update docs
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com> fix: conflicts
This commit is contained in:
committed by
Julius Härtl
parent
eb8a321637
commit
fc9fa5dc25
@@ -57,4 +57,21 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
|
||||
$sql = 'SELECT * from *PREFIX*deck_board_acl WHERE type = ? AND participant = ?';
|
||||
return $this->findEntities($sql, [$type, $participant]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $ownerId
|
||||
* @param $newOwnerId
|
||||
* @return void
|
||||
*/
|
||||
public function transferOwnership($ownerId, $newOwnerId)
|
||||
{
|
||||
$params = [
|
||||
'owner' => $ownerId,
|
||||
'newOwner' => $newOwnerId,
|
||||
'type' => Acl::PERMISSION_TYPE_USER
|
||||
];
|
||||
$sql = "UPDATE `{$this->tableName}` SET `participant` = :newOwner WHERE `participant` = :owner AND `type` = :type";
|
||||
$stmt = $this->execute($sql, $params);
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,4 +146,20 @@ class AssignmentMapper extends QBMapper implements IPermissionMapper {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $ownerId
|
||||
* @param $newOwnerId
|
||||
* @return void
|
||||
*/
|
||||
public function transferOwnership($ownerId, $newOwnerId)
|
||||
{
|
||||
$params = [
|
||||
'owner' => $ownerId,
|
||||
'newOwner' => $newOwnerId
|
||||
];
|
||||
$sql = "UPDATE `{$this->tableName}` SET `participant` = :newOwner WHERE `participant` = :owner";
|
||||
$stmt = $this->execute($sql, $params);
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,4 +475,20 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $ownerId
|
||||
* @param $newOwnerId
|
||||
* @return void
|
||||
*/
|
||||
public function transferOwnership($ownerId, $newOwnerId)
|
||||
{
|
||||
$params = [
|
||||
'owner' => $ownerId,
|
||||
'newOwner' => $newOwnerId
|
||||
];
|
||||
$sql = "UPDATE `{$this->tableName}` SET `owner` = :newOwner WHERE `owner` = :owner";
|
||||
$stmt = $this->execute($sql, $params);
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,4 +586,20 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $ownerId
|
||||
* @param $newOwnerId
|
||||
* @return void
|
||||
*/
|
||||
public function transferOwnership($ownerId, $newOwnerId)
|
||||
{
|
||||
$params = [
|
||||
'owner' => $ownerId,
|
||||
'newOwner' => $newOwnerId
|
||||
];
|
||||
$sql = "UPDATE `{$this->tableName}` SET `owner` = :newOwner WHERE `owner` = :owner";
|
||||
$stmt = $this->execute($sql, $params);
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user