定制 grizzlylab/deny-routes-by-env-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

grizzlylab/deny-routes-by-env-bundle

最新稳定版本:1.1.4

Composer 安装命令:

composer require grizzlylab/deny-routes-by-env-bundle

包简介

Deny routes for one or several environments

README 文档

README

This bundle for Symfony allows you to deny some routes for a specific environment. When a route is denied, it will create a flash message and redirect the user to the "redirection route".

Example: You don't want your users to be able to access the route "acme_xyz" when the environment is "dev" or "demo".

###1. Installation

  • composer require 'grizzlylab/deny-routes-by-env-bundle@dev-master'
  • in AppKernel.php: new Grizzlylab\Bundle\DenyRoutesByEnvBundle\GrizzlylabDenyRoutesByEnvBundle()

###2. Configuration

a) Configure your main configuration file (app/config/config.yml):

#app/config/config.yml
grizzlylab_deny_routes_by_env:
    message_type:         grizzlylab_deny_routes_by_env.danger
    denied_routes:        [] # Required
    redirection_route:    # Required
        name:                 ~
        parameters:           []

b) Then configure each config file related to the concerned environments (e.g. app/config/config_dev.yml)

#app/config/config_dev.yml
grizzlylab_deny_routes_by_env:
    # deny these routes for the environment "dev"
    denied_routes:        ['first_route', 'second_route'] # Required

License

This bundle is under the MIT license.

统计信息

  • 总下载量: 15.88k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固