Fix formatting.
Remove whitespace.
Fix canLink method (see #10548)
Clean code.
Merge pull request #929 from jburel/rebased/develop/create-permissions

Create permissions (rebased onto develop)