Feature Create User
tests
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
2583 template_name = 'dashboard/user-create.html' 2584 2585 def get_group(self, group_pk): 2586 self.group = get_object_or_404(Group, pk=group_pk) 2587 if not self.group.profile.has_level(self.request.user, 'owner'): 2588 raise PermissionDenied() 2589 2590 def get(self, *args, **kwargs): 2591 if not self.request.user.has_perm('auth.add_user'): 2592 raise PermissionDenied() 2593 self.get_group(kwargs.pop('group_pk')) 2594 return super(UserCreationView, self).get(*args, **kwargs) 2595 2596 def post(self, *args, **kwargs): 2597 if not self.request.user.has_perm('auth.add_user'): 2598 raise PermissionDenied() -
Owner
I'd prefer http://django-braces.readthedocs.org/en/latest/access.html#permissionrequiredmixinfixed (fcf7744c)
-
-
Owner
👍 -
-