add role checking to controllers
This commit is contained in:
@@ -131,6 +131,7 @@ class Account extends \yii\db\ActiveRecord
|
||||
public static function read($forceIncludeAccount = null){
|
||||
$accounts = null;
|
||||
$query = Account::find();
|
||||
|
||||
$query->innerJoinWith('userAccountAssignments');
|
||||
$query->andWhere(['user_account_assignment.id_user' => Yii::$app->user->id]);
|
||||
if ( $forceIncludeAccount == null){
|
||||
|
||||
Reference in New Issue
Block a user