Skip to content

Commit

Permalink
Add imported users to Authenticated group
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Tucker committed Jan 7, 2013
1 parent c39bb88 commit 4b6350e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion import_wikis/sycamore/syc_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ def is_image(filename):


def process_user_element(element):
from django.contrib.auth.models import User
from django.contrib.auth.models import User, Group
logger = logging.getLogger(__name__ + '.process_user_element')

parent = element.getparent()
Expand All @@ -1363,6 +1363,8 @@ def process_user_element(element):
if enc_password != '':
u.password = enc_password
u.save()
g = Group.objects.get(name="Authenticated")
u.groups.add(g)
logger.debug("Created user: %s <%s>", smart_str(username), smart_str(email))


Expand Down

0 comments on commit 4b6350e

Please sign in to comment.