예제 #1
0
 def invoke(self, *args, **options):
     organization_ = organization.get(domain=options['organization'])
     if organization_ == None:
         raise CommandError('unknown organization')
     username = "******" % (options['username'], organization_.suffix)
     user_ = user.get(username=username)
     if user_ == None:
         raise CommandError('unknown user')
     user_.is_staff = not options['disable']
     user_.save()
예제 #2
0
파일: views.py 프로젝트: joanma100/mieli
 def approve(self, request, user_pk):
     registry.signal('user_approval', user=user.get(pk=user_pk), send_invitation=True)