Make it clear that this should only be run once.

This commit is contained in:
cahrens
2013-06-27 11:00:11 -04:00
parent 0e0f22999d
commit 27e720cf3b
2 changed files with 6 additions and 1 deletions

View File

@@ -210,7 +210,10 @@ def is_user_in_creator_group(user):
def _grant_instructors_creator_access(caller):
"""
This is to be called only by either a command line code path or through an app which has already
asserted permissions to do this action
asserted permissions to do this action.
Gives all users with instructor role course creator rights.
This is only intended to be run once on a given environment.
"""
for group in Group.objects.all():
if group.name.startswith(INSTRUCTOR_ROLE_NAME + "_"):

View File

@@ -1,5 +1,7 @@
"""
Script for granting existing course instructors course creator privileges.
This script is only intended to be run once on a given environment.
"""
from auth.authz import _grant_instructors_creator_access
from django.core.management.base import BaseCommand