Accessing Yii Permissions in the assets folder

I’ve published the PDW file browser plugin for CKEditor in the assets folder. I need to check user permissions in the PDW plugin so only verified users can upload/delete images. Here is what I need to run:


if(!Yii::app()->user->checkAccess('viewAdminPanel')) { echo 'No access'; die(); }

How do I call the Yii framework and any necessary session information to check?