wabe 0.5.16 → 0.5.18
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.d.ts +1 -0
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -62565,6 +62565,9 @@ var signInWithResolver = async (_, {
|
|
|
62565
62565
|
var signUpWithResolver = async (_, {
|
|
62566
62566
|
input
|
|
62567
62567
|
}, context) => {
|
|
62568
|
+
const userSchema = context.wabe.config.schema?.classes?.find((classItem) => classItem.name === "User");
|
|
62569
|
+
if (userSchema?.permissions?.create?.requireAuthentication === true)
|
|
62570
|
+
throw new Error("Permission denied to create class User");
|
|
62568
62571
|
const res = await context.wabe.controllers.database.createObject({
|
|
62569
62572
|
className: "User",
|
|
62570
62573
|
data: {
|
|
@@ -63480,7 +63483,6 @@ class Schema {
|
|
|
63480
63483
|
requireAuthentication: true
|
|
63481
63484
|
},
|
|
63482
63485
|
create: {
|
|
63483
|
-
authorizedRoles: [],
|
|
63484
63486
|
requireAuthentication: false
|
|
63485
63487
|
},
|
|
63486
63488
|
read: {
|
|
@@ -75727,7 +75729,7 @@ class Wabe {
|
|
|
75727
75729
|
const roleEnum = {
|
|
75728
75730
|
name: "RoleEnum",
|
|
75729
75731
|
values: roles.reduce((acc, currentRole) => {
|
|
75730
|
-
acc[currentRole] =
|
|
75732
|
+
acc[currentRole] = currentRole;
|
|
75731
75733
|
return acc;
|
|
75732
75734
|
}, {})
|
|
75733
75735
|
};
|