public function delete( $model, $config = [] ) {

		$admin = isset( $config[ 'admin' ] ) ? $config[ 'admin' ] : false;

		if( isset( $model ) ) {

			// Only admin is authorised to delete a shared file using file browser.
			if( $admin || !$model->shared ) {

				// Delete mappings
				Yii::$app->factory->get( 'modelFileService' )->deleteByModelId( $model->id );

				// Delete from disk
				$model->clearDisk();

				// Delete model
				return parent::delete( $model, $config );
			}
		}

		return false;
	}