2017 © Pedro Peláez
 

symfony-bundle deny-routes-by-env-bundle

Deny routes for one or several environments

image

grizzlylab/deny-routes-by-env-bundle

Deny routes for one or several environments

  • Thursday, June 7, 2018
  • by grizzlylab
  • Repository
  • 1 Watchers
  • 3 Stars
  • 2,243 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 17 % Grown

The README.md

DenyRoutesByEnvBundle

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"., (*1)

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

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):, (*3)

#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), (*4)

#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., (*5)

The Versions

07/06 2018

dev-master

9999999-dev https://github.com/grizzlylab/deny-routes-by-env-bundle

Deny routes for one or several environments

  Sources   Download

MIT

The Requires

 

by Jean-Louis Pirson

routing environment

28/07 2016

1.0

1.0.0.0 https://github.com/grizzlylab/deny-routes-by-env-bundle

Deny routes for one or several environments

  Sources   Download

MIT

The Requires

 

by Jean-Louis Pirson

routing environment