This mimics the behavior of workbench 1, however we don't support
displaying / signing user agreements.
super(serverApi, "users", actions);
}
+ activate(uuid: string) {
+ return CommonResourceService.defaultResponse(
+ this.serverApi
+ .post(this.resourceType + `${uuid}/activate`),
+ this.actions
+ );
+ }
+
unsetup(uuid: string) {
return CommonResourceService.defaultResponse(
this.serverApi
dispatch<any>(initSessions(services.authService, config, user));
dispatch<any>(getUserDetails()).then((user: User) => {
dispatch(authActions.INIT({ user, token }));
+ if (!user.isActive) {
+ services.userService.activate(user.uuid).then((user: User) => {
+ dispatch(authActions.INIT({ user, token }));
+ });
+ }
}).catch((err: AxiosError) => {
if (err.response) {
// Bad token