承接 deryabinsergey/yii2-app-extended 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

deryabinsergey/yii2-app-extended

Composer 安装命令:

composer create-project deryabinsergey/yii2-app-extended

包简介

Yii 2 Extended Project Template

README 文档

README

Install via composer

composer create-project --prefer-dist deryabinsergey/yii2-app-extended:2

Benefits

This Project Template based on Advanced Template with some modifications

  • add rmrevin / yii2-fontawesome Asset Bundle with Font Awesome 5
  • add Bootstrap Dasboard Template to backend
  • remove unique key from user.username. Authorization by email and password.
  • add RBAC implementation for users. Use in backend.
  • add User CRUD to backend
  • make codeception tests valid, using yii2-bootstrap5
  • add some tests to backend / create user, acceptance tests for backend
  • add selenium to docker-compose.yml and docker config at frontend/tests/acceptance.suite.yml.example
  • change php to yiisoftware/yii2-php:8.1-apache in Dockerfile
  • add config to Dockerfile for pretty URL
  • add urlManagerFrontend to backend config for making links from backend to frontend

Be careful in environments/dev/frontend/web/index-test.php and environments/dev/backend/web/index-test.php removed code to start test on Docker:

// NOTE: Make sure this file is not accessible when deployed to production
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
    die('You are not allowed to access this file.');
}

All information and documentation available at Advanced Project Template.

Using RBAC

Roles and permissions defined in common/config/params.php For adding new permission, roles and assigned permissions to roles - should create migration. For example see console/migrations/m221002_102238_initialize_rbac_roles.php For began i make this permissions

  • backend - access to backend
  • userCreate - add new users in backend
  • userRead - view information about existed users
  • userUpdate - can update user information
  • userDelete - can delete users (NB: you can soft delete existed users, just set status deleted)

and next roles

  • admin has full permissions
  • manager has full permissions without delete
  • viewer has only read permissions

Default Roles and Permissions in tree view:

admin (role)
├─userDelete (permission)
│
└─manager (role)
  ├─userCreate (permission)
  ├─userUpdate (permission)
  │
  └─viever (role)
    │
    ├─backend (permission)
    └─userRead (permission)

Acceptance tests

Complete next steps to enable acceptance tests:

  • copy frontend config file frontend/tests/acceptance.suite.yml.example to frontend/tests/acceptance.suite.yml and backend config file backend/tests/acceptance.suite.yml.example to backend/tests/acceptance.suite.yml
  • uncomment sections selenium-event-bus, selenium-sessions, selenium-session-queue, selenium-distributor, selenium-router, chrome, firefox in docker-compose.yml
  • build tests: ./vendor/bin/codecept build

Run all tests: ./vendor/bin/codecept run

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-09-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固