enforce note perms in comm, refactor perm code /w tests (bug 927871)
Merge pull request #1292 from ngokevin/commperms

enforce note perms in comm, refactor perm code /w tests (bug 927871)