//Api permission
public function actionTest(){
        $id=1;
        $userModel = User::model()->findByPK($id);
        if ((int) $userModel->id > 0) {
            //usergoup permissions
            $userGroups = MasUserGroup::model()->find('id in (' . $userModel->user_group_id . ')');
	        $permissionArray = CJSON::decode($userGroups->permissions);    
            //usergoup permissions
            
            if (array_key_exists('pur_landingcost_view',$permissionArray)) {
                echo 'exists';
            }else{
                'not exists';
            }
        }
    }