@adminforth/user-soft-delete 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -41,12 +41,12 @@ export default class UserSoftDelete extends AdminForthPlugin {
41
41
  body: {
42
42
  allowedLogin: false,
43
43
  redirectTo: '/login',
44
- },
45
- ok: true
44
+ }
46
45
  };
47
46
  if (adminUser.dbUser[this.options.activeFieldName] === false) {
48
47
  return rejectResult;
49
48
  }
49
+ return { body: { allowedLogin: true } };
50
50
  }));
51
51
  const adminUserAuthorize = this.adminforth.config.auth.adminUserAuthorize;
52
52
  const adminUserAuthorizeArray = Array.isArray(adminUserAuthorize) ? adminUserAuthorize : [adminUserAuthorize];
@@ -58,6 +58,7 @@ export default class UserSoftDelete extends AdminForthPlugin {
58
58
  if (adminUser.dbUser[this.options.activeFieldName] === false) {
59
59
  return rejectResult;
60
60
  }
61
+ return { allowed: true };
61
62
  }));
62
63
  if (!resourceConfig.options.pageInjections) {
63
64
  resourceConfig.options.pageInjections = {};
package/index.ts CHANGED
@@ -35,12 +35,12 @@ export default class UserSoftDelete extends AdminForthPlugin {
35
35
  body:{
36
36
  allowedLogin: false,
37
37
  redirectTo: '/login',
38
- },
39
- ok: true
38
+ }
40
39
  };
41
40
  if (adminUser.dbUser[this.options.activeFieldName] === false) {
42
41
  return rejectResult;
43
42
  }
43
+ return { body: {allowedLogin: true} };
44
44
  }
45
45
  );
46
46
 
@@ -55,6 +55,7 @@ export default class UserSoftDelete extends AdminForthPlugin {
55
55
  if (adminUser.dbUser[this.options.activeFieldName] === false) {
56
56
  return rejectResult;
57
57
  }
58
+ return { allowed: true };
58
59
  }
59
60
  );
60
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/user-soft-delete",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",