rest\ActiveController checkAccess()

checkAccess() public method

Checks the privilege of the current user.

This method should be overridden to check whether the current user has the privilege to run the specified action against the specified data model. If the user does not have access, a yii\web\ForbiddenHttpException should be thrown.

public void checkAccess ( $action, $model = null, $params = [] )
$action string

The ID of the action to be executed

$model object

The model to be accessed. If null, it means no specific model is being accessed.

$params array

Additional parameters

throws yii\web\ForbiddenHttpException

if the user does not have access

doc_Yii
2016-10-30 17:11:01
Comments
Leave a Comment

Please login to continue.