Files
Phraseanet/lib/Alchemy/Phrasea/ControllerProvider/Admin/Users.php
jygaulier a70bf2fc70 PHRAS-1304_AUTO-COMPLETION_MASTER (#2061)
* PHRAS-1304_AUTO-COMPLETION_MASTER
ported from 4.0

* PHRAS-1304_AUTO-COMPLETION_MASTER
fix

* PHRAS-1304_AUTO-COMPLETION_MASTER
fix

* PHRAS-1304_AUTO-COMPLETION_MASTER
bump php version to 5.5.31 (5.5.21 is obsolete in cicleci)

* PHRAS-1304_AUTO-COMPLETION_MASTER
bump php version to 5.5.31 : php.ini moved in circelci

* PHRAS-1304_AUTO-COMPLETION_MASTER
add zmq & date to php for circleci

* PHRAS-1304_AUTO-COMPLETION_MASTER
add zmq

* PHRAS-1304_AUTO-COMPLETION_MASTER
bump amqp

* PHRAS-1304_AUTO-COMPLETION_MASTER
downgrade amqp to 1.2 to test compilation against old librabbit 0.4 (ubuntu)

* PHRAS-1304_AUTO-COMPLETION_MASTER
add amqp.so to php.ini, (re)bump amqp to 1.6

* PHRAS-1304_AUTO-COMPLETION_MASTER
build rabittmq from git

* PHRAS-1304_AUTO-COMPLETION_MASTER
build rabittmq from git again

* PHRAS-1304_AUTO-COMPLETION_MASTER
build rabittmq from git again and again

* PHRAS-1304_AUTO-COMPLETION_MASTER
fix test on media rotation 600*400 -> 400*599 !!!

* PHRAS-1304_AUTO-COMPLETION_MASTER
restore facebook sdk to 4.0.1 due to mistake

* PHRAS-1304_AUTO-COMPLETION_MASTER
deleted unwanted file
2017-02-06 18:26:56 +01:00

91 lines
4.2 KiB
PHP

<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2016 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Alchemy\Phrasea\ControllerProvider\Admin;
use Alchemy\Phrasea\Controller\Admin\UserController;
use Alchemy\Phrasea\Core\LazyLocator;
use Alchemy\Phrasea\ControllerProvider\ControllerProviderTrait;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Silex\ServiceProviderInterface;
class Users implements ControllerProviderInterface, ServiceProviderInterface
{
use ControllerProviderTrait;
public function register(Application $app)
{
$app['controller.admin.users'] = $app->share(function () use ($app) {
return (new UserController($app))
->setDelivererLocator(new LazyLocator($app, 'notification.deliverer'))
->setUserQueryFactory(new LazyLocator($app, 'phraseanet.user-query'))
;
});
}
public function boot(Application $app)
{
}
public function connect(Application $app)
{
$controllers = $this->createAuthenticatedCollection($app);
$firewall = $this->getFirewall($app);
$controllers->before(function () use ($firewall) {
$firewall->requireAccessToModule('admin')
->requireRight(\ACL::CANADMIN);
});
$controllers->match('/rights/', 'controller.admin.users:editRightsAction')
->method('GET|POST');
$controllers->post('/rights/reset/', 'controller.admin.users:resetRightsAction')
->bind('admin_users_rights_reset');
$controllers->post('/delete/', 'controller.admin.users:deleteUserAction');
$controllers->post('/rights/apply/', 'controller.admin.users:applyRightsAction')
->bind('admin_users_rights_apply');
$controllers->post('/rights/quotas/', 'controller.admin.users:editQuotasRightsAction');
$controllers->post('/rights/quotas/apply/', 'controller.admin.users:applyQuotasAction');
$controllers->post('/rights/time/', 'controller.admin.users:editTimeLimitAction');
$controllers->post('/rights/time/sbas/', 'controller.admin.users:editTimeLimitSbasAction');
$controllers->post('/rights/time/apply/', 'controller.admin.users:applyTimeAction');
$controllers->post('/rights/masks/', 'controller.admin.users:editMasksAction');
$controllers->post('/rights/masks/apply/', 'controller.admin.users:applyMasksAction');
$controllers->match('/search/', 'controller.admin.users:searchAction')
->bind('admin_users_search');
$controllers->post('/search/export/', 'controller.admin.users:searchExportAction')
->bind('admin_users_search_export');
$controllers->post('/apply_template/', 'controller.admin.users:applyTemplateAction')
->bind('admin_users_apply_template');
$controllers->get('/typeahead/search/', 'controller.admin.users:typeAheadSearchAction');
$controllers->post('/create/', 'controller.admin.users:createAction');
$controllers->post('/export/csv/', 'controller.admin.users:exportAction')
->bind('admin_users_export_csv');
$controllers->get('/registrations/', 'controller.admin.users:displayRegistrationsAction')
->bind('users_display_registrations');
$controllers->post('/registrations/', 'controller.admin.users:submitRegistrationAction')
->bind('users_submit_registrations');
$controllers->get('/import/file/', 'controller.admin.users:displayImportFileAction')
->bind('users_display_import_file');
$controllers->post('/import/file/', 'controller.admin.users:submitImportFileAction')
->bind('users_submit_import_file');
$controllers->post('/import/', 'controller.admin.users:submitImportAction')
->bind('users_submit_import');
$controllers->get('/import/example/csv/', 'controller.admin.users:importCsvExampleAction')
->bind('users_import_csv');
$controllers->get('/import/example/rtf/', 'controller.admin.users:importRtfExampleAction')
->bind('users_import_rtf');
return $controllers;
}
}