refact code

- rename hasPublishPermission to getPublishPermission
- feed dialog ui thread