@@ -0,0 +1,1272 @@
+from django_comment_client.models import Permission, Role%0A%0Adef seed_permissions_roles(course_id):%0A    administrator_role = Role.objects.get_or_create(name=%22Administrator%22, course_id=course_id)%5B0%5D%0A    moderator_role = Role.objects.get_or_create(name=%22Moderator%22, course_id=course_id)%5B0%5D%0A    community_ta_role = Role.objects.get_or_create(name=%22Community TA%22, course_id=course_id)%5B0%5D%0A    student_role = Role.objects.get_or_create(name=%22Student%22, course_id=course_id)%5B0%5D%0A%0A    for per in %5B%22vote%22, %22update_thread%22, %22follow_thread%22, %22unfollow_thread%22,%0A                   %22update_comment%22, %22create_sub_comment%22, %22unvote%22, %22create_thread%22,%0A                   %22follow_commentable%22, %22unfollow_commentable%22, %22create_comment%22, %5D:%0A        student_role.add_permission(per)%0A%0A    for per in %5B%22edit_content%22, %22delete_thread%22, %22openclose_thread%22,%0A                    %22endorse_comment%22, %22delete_comment%22, %22see_all_cohorts%22%5D:%0A        moderator_role.add_permission(per)%0A%0A    for per in %5B%22manage_moderator%22%5D:%0A        administrator_role.add_permission(per)%0A%0A    moderator_role.inherit_permissions(student_role)%0A%0A    # For now, Community TA == Moderator, except for the styling.%0A    community_ta_role.inherit_permissions(moderator_role)%0A%0A    administrator_role.inherit_permissions(moderator_role)

add new file