mozilla/kuma — pull request #1197 by lmorchard (2013-06-27 21:02:53+00:00)
Title: bug 768498: Initial steps toward access control for wiki with teams & policies

DO NOT MERGE - DO NOT MERGE - DO NOT MERGE

This PR is the first baby step toward using django-teamwork on MDN. I hoped to have it confidently wrapped up before I left for PTO, but I didn't. However, this *does* seem to be working in that it doesn't break anything. Still, I think there's work left to do.

As-is, the permissions in this PR should not cause anything to change. However, to spot-check, try going into /admin/ and slap a Teamwork Policy on some wiki page.

If you make a Policy that's missing `wiki.view_document` from anonymous users, you should get a Permission Denied when you try viewing while logged out.

If you set a Policy missing `wiki.change_document` for authenticated users, you should get a Permission Denied when trying to edit while logged in.

There are also Teams and Roles, and feel free to play with them, but I am entirely lax in documenting any of that yet.