[Security][Acl] Issue #5787 : Added MutableAclProvider::deleteSecurityIdentity
Code style fix and documentation typo
This commit is contained in:
parent
d744ffaaeb
commit
bdbbe58128
@ -108,6 +108,18 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes the security identity from the database.
|
||||||
|
* ACL entries have the CASCADE option on their foreign key so they will also get deleted
|
||||||
|
*
|
||||||
|
* @param SecurityIdentityInterface $sid
|
||||||
|
* @throws \InvalidArgumentException
|
||||||
|
*/
|
||||||
|
public function deleteSecurityIdentity(SecurityIdentityInterface $sid)
|
||||||
|
{
|
||||||
|
$this->connection->executeQuery($this->getDeleteSecurityIdentityIdSql($sid));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@ -595,6 +607,21 @@ QUERY;
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs the SQL to delete a security identity.
|
||||||
|
*
|
||||||
|
* @param SecurityIdentityInterface $sid
|
||||||
|
* @throws \InvalidArgumentException
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function getDeleteSecurityIdentityIdSql(SecurityIdentityInterface $sid)
|
||||||
|
{
|
||||||
|
$select = $this->getSelectSecurityIdentityIdSql($sid);
|
||||||
|
$delete = preg_replace('/^SELECT id FROM/', 'DELETE FROM', $select);
|
||||||
|
|
||||||
|
return $delete;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs the SQL for updating an object identity.
|
* Constructs the SQL for updating an object identity.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user