/**
* Get the allowed actions for an identity.
*
* @param mixed $identity An integer representing the identity or an array of identities
*
* @return CMSObject Allowed actions for the identity or identities
*
* @since 1.7.0
*/
public function getAllowed($identity)
{
// Sweep for the allowed actions.
$allowed = new CMSObject();
foreach ($this->data as $name => &$action) {
if ($action->allow($identity)) {
$allowed->set($name, true);
}
}
return $allowed;
}