From 1353929a7dbd3f2e897fa7d3ab88e959ca573f9f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 28 May 2016 13:41:54 -0400 Subject: Rename controllers --- app/ServiceProvider/AuthenticationProvider.php | 45 ++++++++--------- app/ServiceProvider/RouteProvider.php | 70 +++++++++++++------------- 2 files changed, 57 insertions(+), 58 deletions(-) (limited to 'app/ServiceProvider') diff --git a/app/ServiceProvider/AuthenticationProvider.php b/app/ServiceProvider/AuthenticationProvider.php index 3d4c7f6b..406cf1c2 100644 --- a/app/ServiceProvider/AuthenticationProvider.php +++ b/app/ServiceProvider/AuthenticationProvider.php @@ -66,39 +66,39 @@ class AuthenticationProvider implements ServiceProviderInterface $acl->setRoleHierarchy(Role::PROJECT_MANAGER, array(Role::PROJECT_MEMBER, Role::PROJECT_VIEWER)); $acl->setRoleHierarchy(Role::PROJECT_MEMBER, array(Role::PROJECT_VIEWER)); - $acl->add('Action', '*', Role::PROJECT_MANAGER); - $acl->add('ActionProject', '*', Role::PROJECT_MANAGER); - $acl->add('ActionCreation', '*', Role::PROJECT_MANAGER); - $acl->add('Analytic', '*', Role::PROJECT_MANAGER); + $acl->add('ActionController', '*', Role::PROJECT_MANAGER); + $acl->add('ProjectActionDuplicationController', '*', Role::PROJECT_MANAGER); + $acl->add('ActionCreationController', '*', Role::PROJECT_MANAGER); + $acl->add('AnalyticController', '*', Role::PROJECT_MANAGER); $acl->add('Board', 'save', Role::PROJECT_MEMBER); - $acl->add('BoardPopover', '*', Role::PROJECT_MEMBER); + $acl->add('BoardPopoverController', '*', Role::PROJECT_MEMBER); $acl->add('TaskPopoverController', '*', Role::PROJECT_MEMBER); - $acl->add('Calendar', 'save', Role::PROJECT_MEMBER); - $acl->add('Category', '*', Role::PROJECT_MANAGER); - $acl->add('Column', '*', Role::PROJECT_MANAGER); - $acl->add('Comment', '*', Role::PROJECT_MEMBER); - $acl->add('Customfilter', '*', Role::PROJECT_MEMBER); - $acl->add('Export', '*', Role::PROJECT_MANAGER); - $acl->add('TaskFile', array('screenshot', 'create', 'save', 'remove', 'confirm'), Role::PROJECT_MEMBER); + $acl->add('CalendarController', 'save', Role::PROJECT_MEMBER); + $acl->add('CategoryController', '*', Role::PROJECT_MANAGER); + $acl->add('ColumnController', '*', Role::PROJECT_MANAGER); + $acl->add('CommentController', '*', Role::PROJECT_MEMBER); + $acl->add('CustomFilterController', '*', Role::PROJECT_MEMBER); + $acl->add('ExportController', '*', Role::PROJECT_MANAGER); + $acl->add('TaskFileController', array('screenshot', 'create', 'save', 'remove', 'confirm'), Role::PROJECT_MEMBER); $acl->add('Gantt', '*', Role::PROJECT_MANAGER); $acl->add('ProjectViewController', array('share', 'updateSharing', 'integrations', 'updateIntegrations', 'notifications', 'updateNotifications', 'duplicate', 'doDuplication'), Role::PROJECT_MANAGER); $acl->add('ProjectPermissionController', '*', Role::PROJECT_MANAGER); $acl->add('ProjectEditController', '*', Role::PROJECT_MANAGER); - $acl->add('ProjectFile', '*', Role::PROJECT_MEMBER); - $acl->add('Projectuser', '*', Role::PROJECT_MANAGER); + $acl->add('ProjectFileController', '*', Role::PROJECT_MEMBER); + $acl->add('ProjectUserOverviewController', '*', Role::PROJECT_MANAGER); $acl->add('ProjectStatusController', '*', Role::PROJECT_MANAGER); $acl->add('SubtaskController', '*', Role::PROJECT_MEMBER); $acl->add('SubtaskRestrictionController', '*', Role::PROJECT_MEMBER); $acl->add('SubtaskStatusController', '*', Role::PROJECT_MEMBER); - $acl->add('Swimlane', '*', Role::PROJECT_MANAGER); + $acl->add('SwimlaneController', '*', Role::PROJECT_MANAGER); $acl->add('TaskViewController', 'remove', Role::PROJECT_MEMBER); $acl->add('TaskCreationController', '*', Role::PROJECT_MEMBER); $acl->add('TaskBulkController', '*', Role::PROJECT_MEMBER); - $acl->add('Taskduplication', '*', Role::PROJECT_MEMBER); + $acl->add('TaskDuplicationController', '*', Role::PROJECT_MEMBER); $acl->add('TaskRecurrenceController', '*', Role::PROJECT_MEMBER); $acl->add('TaskImportController', '*', Role::PROJECT_MANAGER); $acl->add('TaskInternalLinkController', '*', Role::PROJECT_MEMBER); - $acl->add('TaskExternalLink', '*', Role::PROJECT_MEMBER); + $acl->add('TaskExternalLinkController', '*', Role::PROJECT_MEMBER); $acl->add('TaskModificationController', '*', Role::PROJECT_MEMBER); $acl->add('TaskStatusController', '*', Role::PROJECT_MEMBER); $acl->add('UserAjaxController', array('mention'), Role::PROJECT_MEMBER); @@ -120,10 +120,9 @@ class AuthenticationProvider implements ServiceProviderInterface $acl->setRoleHierarchy(Role::APP_MANAGER, array(Role::APP_USER, Role::APP_PUBLIC)); $acl->setRoleHierarchy(Role::APP_USER, array(Role::APP_PUBLIC)); - $acl->add('Auth', array('login', 'check'), Role::APP_PUBLIC); + $acl->add('AuthController', array('login', 'check'), Role::APP_PUBLIC); $acl->add('CaptchaController', '*', Role::APP_PUBLIC); - $acl->add('PasswordReset', '*', Role::APP_PUBLIC); - $acl->add('Webhook', '*', Role::APP_PUBLIC); + $acl->add('PasswordResetController', '*', Role::APP_PUBLIC); $acl->add('TaskViewController', 'readonly', Role::APP_PUBLIC); $acl->add('Board', 'readonly', Role::APP_PUBLIC); $acl->add('ICalendarController', '*', Role::APP_PUBLIC); @@ -137,9 +136,9 @@ class AuthenticationProvider implements ServiceProviderInterface $acl->add('GroupListController', '*', Role::APP_ADMIN); $acl->add('GroupCreationController', '*', Role::APP_ADMIN); $acl->add('GroupModificationController', '*', Role::APP_ADMIN); - $acl->add('Link', '*', Role::APP_ADMIN); - $acl->add('ProjectCreation', 'create', Role::APP_MANAGER); - $acl->add('Projectuser', '*', Role::APP_MANAGER); + $acl->add('LinkController', '*', Role::APP_ADMIN); + $acl->add('ProjectCreationController', 'create', Role::APP_MANAGER); + $acl->add('ProjectUserOverviewController', '*', Role::APP_MANAGER); $acl->add('TwoFactorController', 'disable', Role::APP_ADMIN); $acl->add('UserImportController', '*', Role::APP_ADMIN); $acl->add('UserCreationController', '*', Role::APP_ADMIN); diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php index c30c1574..0182fb39 100644 --- a/app/ServiceProvider/RouteProvider.php +++ b/app/ServiceProvider/RouteProvider.php @@ -45,24 +45,24 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('search/activity', 'SearchController', 'activity'); // ProjectCreation routes - $container['route']->addRoute('project/create', 'ProjectCreation', 'create'); - $container['route']->addRoute('project/create/private', 'ProjectCreation', 'createPrivate'); + $container['route']->addRoute('project/create', 'ProjectCreationController', 'create'); + $container['route']->addRoute('project/create/private', 'ProjectCreationController', 'createPrivate'); // Project routes $container['route']->addRoute('projects', 'ProjectListController', 'show'); $container['route']->addRoute('project/:project_id', 'ProjectViewController', 'show'); $container['route']->addRoute('p/:project_id', 'ProjectViewController', 'show'); - $container['route']->addRoute('project/:project_id/customer-filters', 'customfilter', 'index'); + $container['route']->addRoute('project/:project_id/customer-filters', 'CustomFilterController', 'index'); $container['route']->addRoute('project/:project_id/share', 'ProjectViewController', 'share'); $container['route']->addRoute('project/:project_id/notifications', 'ProjectViewController', 'notifications'); $container['route']->addRoute('project/:project_id/integrations', 'ProjectViewController', 'integrations'); $container['route']->addRoute('project/:project_id/duplicate', 'ProjectViewController', 'duplicate'); $container['route']->addRoute('project/:project_id/permissions', 'ProjectPermissionController', 'index'); $container['route']->addRoute('project/:project_id/import', 'TaskImportController', 'step1'); - $container['route']->addRoute('project/:project_id/activity', 'activity', 'project'); + $container['route']->addRoute('project/:project_id/activity', 'ActivityController', 'project'); // Project Overview - $container['route']->addRoute('project/:project_id/overview', 'ProjectOverview', 'show'); + $container['route']->addRoute('project/:project_id/overview', 'ProjectOverviewController', 'show'); // ProjectEdit routes $container['route']->addRoute('project/:project_id/edit', 'ProjectEditController', 'edit'); @@ -71,48 +71,48 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('project/:project_id/edit/priority', 'ProjectEditController', 'priority'); // ProjectUser routes - $container['route']->addRoute('projects/managers/:user_id', 'projectuser', 'managers'); - $container['route']->addRoute('projects/members/:user_id', 'projectuser', 'members'); - $container['route']->addRoute('projects/tasks/:user_id/opens', 'projectuser', 'opens'); - $container['route']->addRoute('projects/tasks/:user_id/closed', 'projectuser', 'closed'); - $container['route']->addRoute('projects/managers', 'projectuser', 'managers'); + $container['route']->addRoute('projects/managers/:user_id', 'ProjectUserOverviewController', 'managers'); + $container['route']->addRoute('projects/members/:user_id', 'ProjectUserOverviewController', 'members'); + $container['route']->addRoute('projects/tasks/:user_id/opens', 'ProjectUserOverviewController', 'opens'); + $container['route']->addRoute('projects/tasks/:user_id/closed', 'ProjectUserOverviewController', 'closed'); + $container['route']->addRoute('projects/managers', 'ProjectUserOverviewController', 'managers'); // Action routes - $container['route']->addRoute('project/:project_id/actions', 'action', 'index'); + $container['route']->addRoute('project/:project_id/actions', 'ActionController', 'index'); // Column routes - $container['route']->addRoute('project/:project_id/columns', 'column', 'index'); + $container['route']->addRoute('project/:project_id/columns', 'ColumnController', 'index'); // Swimlane routes - $container['route']->addRoute('project/:project_id/swimlanes', 'swimlane', 'index'); + $container['route']->addRoute('project/:project_id/swimlanes', 'SwimlaneController', 'index'); // Category routes - $container['route']->addRoute('project/:project_id/categories', 'category', 'index'); + $container['route']->addRoute('project/:project_id/categories', 'CategoryController', 'index'); // Task routes $container['route']->addRoute('project/:project_id/task/:task_id', 'TaskViewController', 'show'); $container['route']->addRoute('t/:task_id', 'TaskViewController', 'show'); $container['route']->addRoute('public/task/:task_id/:token', 'TaskViewController', 'readonly'); - $container['route']->addRoute('project/:project_id/task/:task_id/activity', 'activity', 'task'); + $container['route']->addRoute('project/:project_id/task/:task_id/activity', 'ActivityController', 'task'); $container['route']->addRoute('project/:project_id/task/:task_id/transitions', 'TaskViewController', 'transitions'); $container['route']->addRoute('project/:project_id/task/:task_id/analytics', 'TaskViewController', 'analytics'); $container['route']->addRoute('project/:project_id/task/:task_id/time-tracking', 'TaskViewController', 'timetracking'); // Exports - $container['route']->addRoute('export/tasks/:project_id', 'export', 'tasks'); - $container['route']->addRoute('export/subtasks/:project_id', 'export', 'subtasks'); - $container['route']->addRoute('export/transitions/:project_id', 'export', 'transitions'); - $container['route']->addRoute('export/summary/:project_id', 'export', 'summary'); + $container['route']->addRoute('export/tasks/:project_id', 'ExportController', 'tasks'); + $container['route']->addRoute('export/subtasks/:project_id', 'ExportController', 'subtasks'); + $container['route']->addRoute('export/transitions/:project_id', 'ExportController', 'transitions'); + $container['route']->addRoute('export/summary/:project_id', 'ExportController', 'summary'); // Analytics routes - $container['route']->addRoute('analytics/tasks/:project_id', 'analytic', 'tasks'); - $container['route']->addRoute('analytics/users/:project_id', 'analytic', 'users'); - $container['route']->addRoute('analytics/cfd/:project_id', 'analytic', 'cfd'); - $container['route']->addRoute('analytics/burndown/:project_id', 'analytic', 'burndown'); - $container['route']->addRoute('analytics/average-time-column/:project_id', 'analytic', 'averageTimeByColumn'); - $container['route']->addRoute('analytics/lead-cycle-time/:project_id', 'analytic', 'leadAndCycleTime'); - $container['route']->addRoute('analytics/estimated-spent-time/:project_id', 'analytic', 'compareHours'); + $container['route']->addRoute('analytics/tasks/:project_id', 'AnalyticController', 'tasks'); + $container['route']->addRoute('analytics/users/:project_id', 'AnalyticController', 'users'); + $container['route']->addRoute('analytics/cfd/:project_id', 'AnalyticController', 'cfd'); + $container['route']->addRoute('analytics/burndown/:project_id', 'AnalyticController', 'burndown'); + $container['route']->addRoute('analytics/average-time-column/:project_id', 'AnalyticController', 'averageTimeByColumn'); + $container['route']->addRoute('analytics/lead-cycle-time/:project_id', 'AnalyticController', 'leadAndCycleTime'); + $container['route']->addRoute('analytics/estimated-spent-time/:project_id', 'AnalyticController', 'compareHours'); // Board routes $container['route']->addRoute('board/:project_id', 'board', 'show'); @@ -120,12 +120,12 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('public/board/:token', 'board', 'readonly'); // Calendar routes - $container['route']->addRoute('calendar/:project_id', 'calendar', 'show'); - $container['route']->addRoute('c/:project_id', 'calendar', 'show'); + $container['route']->addRoute('calendar/:project_id', 'CalendarController', 'show'); + $container['route']->addRoute('c/:project_id', 'CalendarController', 'show'); // Listing routes - $container['route']->addRoute('list/:project_id', 'listing', 'show'); - $container['route']->addRoute('l/:project_id', 'listing', 'show'); + $container['route']->addRoute('list/:project_id', 'TaskListController', 'show'); + $container['route']->addRoute('l/:project_id', 'TaskListController', 'show'); // Gantt routes $container['route']->addRoute('gantt/:project_id', 'gantt', 'project'); @@ -170,7 +170,7 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('settings/integrations', 'ConfigController', 'integrations'); $container['route']->addRoute('settings/webhook', 'ConfigController', 'webhook'); $container['route']->addRoute('settings/api', 'ConfigController', 'api'); - $container['route']->addRoute('settings/links', 'link', 'index'); + $container['route']->addRoute('settings/links', 'LinkController', 'index'); $container['route']->addRoute('settings/currencies', 'CurrencyController', 'index'); // Plugins @@ -182,12 +182,12 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('documentation', 'DocumentationController', 'show'); // Auth routes - $container['route']->addRoute('login', 'auth', 'login'); - $container['route']->addRoute('logout', 'auth', 'logout'); + $container['route']->addRoute('login', 'AuthController', 'login'); + $container['route']->addRoute('logout', 'AuthController', 'logout'); // PasswordReset - $container['route']->addRoute('forgot-password', 'PasswordReset', 'create'); - $container['route']->addRoute('forgot-password/change/:token', 'PasswordReset', 'change'); + $container['route']->addRoute('forgot-password', 'PasswordResetController', 'create'); + $container['route']->addRoute('forgot-password/change/:token', 'PasswordResetController', 'change'); } return $container; -- cgit v1.2.3