Make it clear that this should only be run once.
This commit is contained in:
@@ -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 + "_"):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user