@orion-studios/payload-studio 0.6.0-beta.12 → 0.6.0-beta.13
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/admin/client.js +3 -11
- package/dist/admin/client.mjs +3 -11
- package/package.json +1 -1
package/dist/admin/client.js
CHANGED
|
@@ -8024,7 +8024,7 @@ function AdminStudioFormsView(props) {
|
|
|
8024
8024
|
var import_react32 = require("react");
|
|
8025
8025
|
var import_ui12 = require("@payloadcms/ui");
|
|
8026
8026
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
8027
|
-
var userRoles = ["admin", "
|
|
8027
|
+
var userRoles = ["admin", "developer", "editor", "client"];
|
|
8028
8028
|
var hasAdminAccess4 = (user) => {
|
|
8029
8029
|
if (!user || typeof user !== "object") return false;
|
|
8030
8030
|
const role = user.role;
|
|
@@ -8181,11 +8181,7 @@ function AdminStudioToolsView(props) {
|
|
|
8181
8181
|
] }),
|
|
8182
8182
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { children: [
|
|
8183
8183
|
"Role",
|
|
8184
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.
|
|
8185
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("option", { value: "admin", children: "admin" }),
|
|
8186
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("option", { value: "editor", children: "editor" }),
|
|
8187
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("option", { value: "client", children: "client" })
|
|
8188
|
-
] })
|
|
8184
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("select", { defaultValue: "editor", name: "role", children: userRoles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("option", { value: role, children: role }, role)) })
|
|
8189
8185
|
] }),
|
|
8190
8186
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { disabled: createSubmitting, type: "submit", children: createSubmitting ? "Creating..." : "Create User" })
|
|
8191
8187
|
] }),
|
|
@@ -8203,11 +8199,7 @@ function AdminStudioToolsView(props) {
|
|
|
8203
8199
|
] }),
|
|
8204
8200
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("form", { className: "orion-admin-inline-actions", onSubmit: updateUserRole, children: [
|
|
8205
8201
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("input", { name: "id", type: "hidden", value: id }),
|
|
8206
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.
|
|
8207
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("option", { value: "admin", children: "admin" }),
|
|
8208
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("option", { value: "editor", children: "editor" }),
|
|
8209
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("option", { value: "client", children: "client" })
|
|
8210
|
-
] }),
|
|
8202
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("select", { defaultValue: currentRole, name: "role", children: userRoles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("option", { value: role, children: role }, role)) }),
|
|
8211
8203
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { disabled: updatingUserID === id, type: "submit", children: updatingUserID === id ? "Updating..." : "Update" })
|
|
8212
8204
|
] })
|
|
8213
8205
|
] }, id);
|
package/dist/admin/client.mjs
CHANGED
|
@@ -5698,7 +5698,7 @@ function AdminStudioFormsView(props) {
|
|
|
5698
5698
|
import { useEffect as useEffect18, useState as useState19 } from "react";
|
|
5699
5699
|
import { useAuth as useAuth7 } from "@payloadcms/ui";
|
|
5700
5700
|
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5701
|
-
var userRoles = ["admin", "
|
|
5701
|
+
var userRoles = ["admin", "developer", "editor", "client"];
|
|
5702
5702
|
var hasAdminAccess4 = (user) => {
|
|
5703
5703
|
if (!user || typeof user !== "object") return false;
|
|
5704
5704
|
const role = user.role;
|
|
@@ -5855,11 +5855,7 @@ function AdminStudioToolsView(props) {
|
|
|
5855
5855
|
] }),
|
|
5856
5856
|
/* @__PURE__ */ jsxs27("label", { children: [
|
|
5857
5857
|
"Role",
|
|
5858
|
-
/* @__PURE__ */
|
|
5859
|
-
/* @__PURE__ */ jsx30("option", { value: "admin", children: "admin" }),
|
|
5860
|
-
/* @__PURE__ */ jsx30("option", { value: "editor", children: "editor" }),
|
|
5861
|
-
/* @__PURE__ */ jsx30("option", { value: "client", children: "client" })
|
|
5862
|
-
] })
|
|
5858
|
+
/* @__PURE__ */ jsx30("select", { defaultValue: "editor", name: "role", children: userRoles.map((role) => /* @__PURE__ */ jsx30("option", { value: role, children: role }, role)) })
|
|
5863
5859
|
] }),
|
|
5864
5860
|
/* @__PURE__ */ jsx30("button", { disabled: createSubmitting, type: "submit", children: createSubmitting ? "Creating..." : "Create User" })
|
|
5865
5861
|
] }),
|
|
@@ -5877,11 +5873,7 @@ function AdminStudioToolsView(props) {
|
|
|
5877
5873
|
] }),
|
|
5878
5874
|
/* @__PURE__ */ jsxs27("form", { className: "orion-admin-inline-actions", onSubmit: updateUserRole, children: [
|
|
5879
5875
|
/* @__PURE__ */ jsx30("input", { name: "id", type: "hidden", value: id }),
|
|
5880
|
-
/* @__PURE__ */
|
|
5881
|
-
/* @__PURE__ */ jsx30("option", { value: "admin", children: "admin" }),
|
|
5882
|
-
/* @__PURE__ */ jsx30("option", { value: "editor", children: "editor" }),
|
|
5883
|
-
/* @__PURE__ */ jsx30("option", { value: "client", children: "client" })
|
|
5884
|
-
] }),
|
|
5876
|
+
/* @__PURE__ */ jsx30("select", { defaultValue: currentRole, name: "role", children: userRoles.map((role) => /* @__PURE__ */ jsx30("option", { value: role, children: role }, role)) }),
|
|
5885
5877
|
/* @__PURE__ */ jsx30("button", { disabled: updatingUserID === id, type: "submit", children: updatingUserID === id ? "Updating..." : "Update" })
|
|
5886
5878
|
] })
|
|
5887
5879
|
] }, id);
|
package/package.json
CHANGED