Skip to content
Snippets Groups Projects
Verified Commit fb6e3c3d authored by ynerant's avatar ynerant
Browse files

If connected and if we have the right, directly redirect to the validation...

If connected and if we have the right, directly redirect to the validation page when registering someone

Signed-off-by: ynerant's avatarYohann D'ANELLO <ynerant@crans.org>
parent 391f3bde
No related branches found
No related tags found
2 merge requests!177Corrections de bugs,!176Corrections de bugs
Pipeline #9056 passed with warnings with stages
in 16 minutes and 32 seconds
......@@ -85,6 +85,9 @@ class UserCreateView(CreateView):
return super().form_valid(form)
def get_success_url(self):
# Direct access to validation menu if we have the right to validate it
if PermissionBackend.check_perm(self.request, 'auth.view_user', self.object):
return reverse_lazy('registration:future_user_detail', args=(self.object.pk,))
return reverse_lazy('registration:email_validation_sent')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment