Wagtail hooks hypha.apply.users.wagtail_hooks ¶ register_admin_urls ¶ register_admin_urls() Source code in hypha/apply/users/wagtail_hooks.py 11 12 13 14 15@hooks.register("register_admin_urls") def register_admin_urls(): return [ re_path(r"^users/$", CustomUserIndexView.as_view(), name="index"), ] register_viewset ¶ register_viewset() Source code in hypha/apply/users/wagtail_hooks.py 18 19 20@hooks.register("register_admin_viewset") def register_viewset(): return CustomGroupViewSet("groups", url_prefix="groups") notify_after_create_user ¶ notify_after_create_user(request, user) Source code in hypha/apply/users/wagtail_hooks.py 23 24 25 26 27 28 29 30 31 32 33@hooks.register("after_create_user") def notify_after_create_user(request, user): messenger( MESSAGES.STAFF_ACCOUNT_CREATED, request=request, user=request.user, source=user, ) site = Site.find_for_request(request) send_activation_email(user, site) notify_after_edit_user ¶ notify_after_edit_user(request, user) Source code in hypha/apply/users/wagtail_hooks.py 36 37 38 39 40 41 42 43 44 45 46 47 48 49@hooks.register("after_edit_user") def notify_after_edit_user(request, user): roles = list(user.groups.values_list("name", flat=True)) if user.is_superuser: roles.append("Administrator") if roles: roles = ", ".join(roles) messenger( MESSAGES.STAFF_ACCOUNT_EDITED, request=request, user=request.user, source=user, roles=roles, )