2017 © Pedro Peláez
 

yii2-extension yii2-ajax-access-rule

Ajax access rule for yii2 access filter

image

bigdropinc/yii2-ajax-access-rule

Ajax access rule for yii2 access filter

  • Monday, April 10, 2017
  • by AkiraShirase
  • Repository
  • 1 Watchers
  • 1 Stars
  • 58 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

yii2-ajax-access-rule

Ajax access rule for yii2 access filter, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist bigdropinc/yii2-ajax-access-rule "*"

or add, (*4)

bigdropinc/yii2-ajax-access-rule

to the require section of your composer.json file., (*5)

Usage

For AccessControl rules use AjaxRule::className(), (*6)

'access' => [
                'class' => AccessControl::className(),
                'rules' => [
                    [   
                        'class' => AjaxRule::className(),
                        'actions' => ['some-action'],
                        'verbs' => ['POST'],
                        'allow' => true #this will allow only ajax requests for specified action
                    ],
                    [   
                        'class' => AjaxRule::className(),
                        'actions' => ['another-action'],
                        'allow' => false #this will allow only non-ajax request for specified action
                    ],
                ]
]

The Versions

10/04 2017

dev-master

9999999-dev

Ajax access rule for yii2 access filter

  Sources   Download

BSD-3-Clause

The Requires

 

by Akira Shirase

extension filter yii2 ajax access

10/04 2017

1.0.0

1.0.0.0

Ajax access rule for yii2 access filter

  Sources   Download

BSD-3-Clause

The Requires

 

by Akira Shirase

extension filter yii2 ajax access