/** * Check if the user the necessary credentials to see this particular item * * @param array $item * @param sfUser $user */ public static function hasPermission($item, $user) { if (!$user->isAuthenticated()) { return false; } return isset($item['credentials']) ? $user->hasCredential($item['credentials']) : true; }