63 lines
1.5 KiB
Markdown
63 lines
1.5 KiB
Markdown
|
# Модуль User
|
|||
|
|
|||
|
## Подключение модуля
|
|||
|
|
|||
|
'modules' => [
|
|||
|
'user' => [
|
|||
|
'class' => backend\modules\user\Module::class,
|
|||
|
],
|
|||
|
]
|
|||
|
|
|||
|
Прописываем nameSpace в сгенерированном файле для подключения к проекту
|
|||
|
|
|||
|
namespace backend\modules\user\migrations;
|
|||
|
|
|||
|
Добавляем миграции в настройки проекта
|
|||
|
|
|||
|
'controllerMap' => [
|
|||
|
'migrate' => [
|
|||
|
'class' => yii\console\controllers\MigrateController::class,
|
|||
|
'migrationNamespaces' => [
|
|||
|
'backend\modules\user\migrations',
|
|||
|
],
|
|||
|
],
|
|||
|
],
|
|||
|
|
|||
|
docker-compose run --rm php ./yii migrate --migrationPath=@yii/rbac/migrations
|
|||
|
|
|||
|
docker-compose run --rm php ./yii migrate
|
|||
|
|
|||
|
Добавление миграций
|
|||
|
|
|||
|
docker-compose run --rm php ./yii migrate/create --migrationPath=@backend/modules/user/migrations create_users_table
|
|||
|
|
|||
|
|
|||
|
##Roles
|
|||
|
|
|||
|
user_customer:
|
|||
|
|
|||
|
- customer (заказчик);
|
|||
|
|
|||
|
user_employee:
|
|||
|
|
|||
|
- author (автор/исполнитель);
|
|||
|
- technic (ТЗ-мейкер);
|
|||
|
- auditor (аудитор);
|
|||
|
- manager (контент-менеджер);
|
|||
|
|
|||
|
user_admin:
|
|||
|
|
|||
|
- supervisor (супервайзер);
|
|||
|
- admin (администратор);
|
|||
|
|
|||
|
test data:
|
|||
|
|
|||
|
- admin@content.local:admin
|
|||
|
- supervisor@content.local:supervisor
|
|||
|
- customer@content.local:customer
|
|||
|
- technic@content.local:technic
|
|||
|
- author@content.local:author
|
|||
|
- auditor@content.local:auditor
|
|||
|
- manager@content.local:manager
|
|||
|
|