adapt note/thread permissions for creation (bug 879545)

* Also, add creation tests.