mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Add webhook event && fix tests
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Alchemy\Phrasea\Core\Event\Subscriber;
|
|||||||
|
|
||||||
use Alchemy\Phrasea\Core\Event\FeedEntryEvent;
|
use Alchemy\Phrasea\Core\Event\FeedEntryEvent;
|
||||||
use Alchemy\Phrasea\Core\PhraseaEvents;
|
use Alchemy\Phrasea\Core\PhraseaEvents;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\WebhookEvent;
|
||||||
use Alchemy\Phrasea\Notification\Receiver;
|
use Alchemy\Phrasea\Notification\Receiver;
|
||||||
use Alchemy\Phrasea\Notification\Mail\MailInfoNewPublication;
|
use Alchemy\Phrasea\Notification\Mail\MailInfoNewPublication;
|
||||||
|
|
||||||
@@ -27,6 +28,12 @@ class FeedEntrySubscriber extends AbstractNotificationSubscriber
|
|||||||
'notify_email' => $event->hasEmailNotification(),
|
'notify_email' => $event->hasEmailNotification(),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$this->app['manipulator.webhook-event']->create(
|
||||||
|
WebhookEvent::NEW_FEED_ENTRY,
|
||||||
|
WebhookEvent::FEED_ENTRY_TYPE,
|
||||||
|
array_merge(array('feed_id' => $entry->getFeed()->getId()), $params)
|
||||||
|
);
|
||||||
|
|
||||||
$datas = json_encode($params);
|
$datas = json_encode($params);
|
||||||
|
|
||||||
$Query = new \User_Query($this->app);
|
$Query = new \User_Query($this->app);
|
||||||
|
@@ -274,6 +274,12 @@ class ACLTest extends \PhraseanetAuthenticatedTestCase
|
|||||||
return $collection->get_base_id();
|
return $collection->get_base_id();
|
||||||
}, $acl->get_order_master_collections()));
|
}, $acl->get_order_master_collections()));
|
||||||
$this->assertEquals(0, count($tbas));
|
$this->assertEquals(0, count($tbas));
|
||||||
|
|
||||||
|
foreach ($appbox->get_databoxes() as $databox) {
|
||||||
|
foreach ($databox->get_collections() as $collection) {
|
||||||
|
$acl->set_order_master($collection, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIs_restricted_download()
|
public function testIs_restricted_download()
|
||||||
|
Reference in New Issue
Block a user