@budibase/backend-core 2.32.1 → 2.32.3

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
@@ -62040,10 +62040,11 @@ var RoleIDVersion = {
62040
62040
  NAME: "name"
62041
62041
  };
62042
62042
  var Role = class {
62043
- constructor(id, name, permissionId) {
62043
+ constructor(id, permissionId, uiMetadata) {
62044
62044
  this.permissions = {};
62045
62045
  this._id = id;
62046
- this.name = name;
62046
+ this.name = uiMetadata?.displayName || id;
62047
+ this.uiMetadata = uiMetadata;
62047
62048
  this.permissionId = permissionId;
62048
62049
  this.version = RoleIDVersion.NAME;
62049
62050
  }
@@ -62053,23 +62054,31 @@ var Role = class {
62053
62054
  }
62054
62055
  };
62055
62056
  var BUILTIN_ROLES = {
62056
- ADMIN: new Role(
62057
- BUILTIN_IDS.ADMIN,
62058
- "Admin",
62059
- "admin" /* ADMIN */
62060
- ).addInheritance(BUILTIN_IDS.POWER),
62061
- POWER: new Role(
62062
- BUILTIN_IDS.POWER,
62063
- "Power",
62064
- "power" /* POWER */
62065
- ).addInheritance(BUILTIN_IDS.BASIC),
62066
- BASIC: new Role(
62067
- BUILTIN_IDS.BASIC,
62068
- "Basic",
62069
- "write" /* WRITE */
62070
- ).addInheritance(BUILTIN_IDS.PUBLIC),
62071
- PUBLIC: new Role(BUILTIN_IDS.PUBLIC, "Public", "public" /* PUBLIC */),
62072
- BUILDER: new Role(BUILTIN_IDS.BUILDER, "Builder", "admin" /* ADMIN */)
62057
+ ADMIN: new Role(BUILTIN_IDS.ADMIN, "admin" /* ADMIN */, {
62058
+ displayName: "App admin",
62059
+ description: "Can do everything",
62060
+ color: "var(--spectrum-global-color-static-red-400)" /* ADMIN */
62061
+ }).addInheritance(BUILTIN_IDS.POWER),
62062
+ POWER: new Role(BUILTIN_IDS.POWER, "power" /* POWER */, {
62063
+ displayName: "App power user",
62064
+ description: "An app user with more access",
62065
+ color: "var(--spectrum-global-color-static-orange-400)" /* POWER */
62066
+ }).addInheritance(BUILTIN_IDS.BASIC),
62067
+ BASIC: new Role(BUILTIN_IDS.BASIC, "write" /* WRITE */, {
62068
+ displayName: "App user",
62069
+ description: "Any logged in user",
62070
+ color: "var(--spectrum-global-color-static-green-400)" /* BASIC */
62071
+ }).addInheritance(BUILTIN_IDS.PUBLIC),
62072
+ PUBLIC: new Role(BUILTIN_IDS.PUBLIC, "public" /* PUBLIC */, {
62073
+ displayName: "Public user",
62074
+ description: "Accessible to anyone",
62075
+ color: "var(--spectrum-global-color-static-blue-400)" /* PUBLIC */
62076
+ }),
62077
+ BUILDER: new Role(BUILTIN_IDS.BUILDER, "admin" /* ADMIN */, {
62078
+ displayName: "Builder user",
62079
+ description: "Users that can edit this app",
62080
+ color: "var(--spectrum-global-color-static-magenta-600)" /* BUILDER */
62081
+ })
62073
62082
  };
62074
62083
  function getBuiltinRoles() {
62075
62084
  return (0, import_cloneDeep2.default)(BUILTIN_ROLES);