@budibase/backend-core 2.32.3 → 2.32.4

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