WIKI-950:
- Only migrate pages having any permission
- Update permission of attachment when changing permission via Permission dialog