|
22 | 22 | use VentureDrake\LaravelCrm\Http\Middleware\LastOnlineAt; |
23 | 23 | use VentureDrake\LaravelCrm\Http\Middleware\Settings; |
24 | 24 | use VentureDrake\LaravelCrm\Http\Middleware\SystemCheck; |
| 25 | +use VentureDrake\LaravelCrm\Http\Middleware\TeamsPermission; |
25 | 26 | use VentureDrake\LaravelCrm\Models\Email; |
26 | 27 | use VentureDrake\LaravelCrm\Models\Lead; |
27 | 28 | use VentureDrake\LaravelCrm\Models\Organisation; |
@@ -82,6 +83,8 @@ class_alias('App\Models\Team', 'App\Team'); |
82 | 83 |
|
83 | 84 | // Middleware |
84 | 85 | $router->aliasMiddleware('auth.laravel-crm', Authenticate::class); |
| 86 | + $router->pushMiddlewareToGroup('crm', TeamsPermission::class); |
| 87 | + $router->pushMiddlewareToGroup('api', TeamsPermission::class); |
85 | 88 | $router->pushMiddlewareToGroup('crm', Settings::class); |
86 | 89 | $router->pushMiddlewareToGroup('api', Settings::class); |
87 | 90 | $router->pushMiddlewareToGroup('crm', HasCrmAccess::class); |
@@ -164,14 +167,13 @@ function ($perPage = 30, $page = null, $options = []) { |
164 | 167 | __DIR__ . '/../database/migrations/create_laravel_crm_deal_products_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_deal_products_table.php', 10), |
165 | 168 | __DIR__ . '/../database/migrations/add_global_to_laravel_crm_settings_table.php.stub' => $this->getMigrationFileName($filesystem, 'add_global_to_laravel_crm_settings_table.php', 11), |
166 | 169 | __DIR__ . '/../database/migrations/alter_fields_for_encryption_on_laravel_crm_tables.php.stub' => $this->getMigrationFileName($filesystem, 'alter_fields_for_encryption_on_laravel_crm_tables.php', 12), |
167 | | - __DIR__ . '/../database/migrations/add_team_id_to_roles_permissions_tables.php.stub' => $this->getMigrationFileName($filesystem, 'add_team_id_to_roles_permissions_tables.php', 13), |
168 | | - __DIR__ . '/../database/migrations/create_laravel_crm_address_types_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_address_types_table.php', 14), |
169 | | - __DIR__ . '/../database/migrations/alter_type_on_laravel_crm_phones_table.php.stub' => $this->getMigrationFileName($filesystem, 'alter_type_on_laravel_crm_phones_table.php', 15), |
170 | | - __DIR__ . '/../database/migrations/add_description_to_laravel_crm_labels_table.php.stub' => $this->getMigrationFileName($filesystem, 'add_description_to_laravel_crm_labels_table.php', 16), |
171 | | - __DIR__ . '/../database/migrations/add_name_to_laravel_crm_addresses_table.php.stub' => $this->getMigrationFileName($filesystem, 'add_name_to_laravel_crm_addresses_table.php', 17), |
172 | | - __DIR__ . '/../database/migrations/create_laravel_crm_contacts_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_contacts_table.php', 18), |
173 | | - __DIR__ . '/../database/migrations/create_laravel_crm_contact_types_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_contact_types_table.php', 19), |
174 | | - __DIR__ . '/../database/migrations/create_laravel_crm_contact_contact_type_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_contact_contact_type_table.php', 20), |
| 170 | + __DIR__ . '/../database/migrations/create_laravel_crm_address_types_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_address_types_table.php', 13), |
| 171 | + __DIR__ . '/../database/migrations/alter_type_on_laravel_crm_phones_table.php.stub' => $this->getMigrationFileName($filesystem, 'alter_type_on_laravel_crm_phones_table.php', 14), |
| 172 | + __DIR__ . '/../database/migrations/add_description_to_laravel_crm_labels_table.php.stub' => $this->getMigrationFileName($filesystem, 'add_description_to_laravel_crm_labels_table.php', 15), |
| 173 | + __DIR__ . '/../database/migrations/add_name_to_laravel_crm_addresses_table.php.stub' => $this->getMigrationFileName($filesystem, 'add_name_to_laravel_crm_addresses_table.php', 16), |
| 174 | + __DIR__ . '/../database/migrations/create_laravel_crm_contacts_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_contacts_table.php', 17), |
| 175 | + __DIR__ . '/../database/migrations/create_laravel_crm_contact_types_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_contact_types_table.php', 18), |
| 176 | + __DIR__ . '/../database/migrations/create_laravel_crm_contact_contact_type_table.php.stub' => $this->getMigrationFileName($filesystem, 'create_laravel_crm_contact_contact_type_table.php', 19), |
175 | 177 | ], 'migrations'); |
176 | 178 |
|
177 | 179 | // Publishing the seeders |
|
0 commit comments