From 5d9175b981a2393df91774747a1672c8c3304f7c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 3 Dec 2020 12:28:30 +0000 Subject: [PATCH] Making public and basic roles accessible. --- packages/server/src/api/controllers/role.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/role.js b/packages/server/src/api/controllers/role.js index 7889233026..3ebda124b0 100644 --- a/packages/server/src/api/controllers/role.js +++ b/packages/server/src/api/controllers/role.js @@ -15,7 +15,13 @@ exports.fetch = async function(ctx) { ) const customRoles = body.rows.map(row => row.doc) - const staticRoles = [BUILTIN_ROLES.ADMIN, BUILTIN_ROLES.POWER] + // exclude internal roles like builder + const staticRoles = [ + BUILTIN_ROLES.ADMIN, + BUILTIN_ROLES.POWER, + BUILTIN_ROLES.BASIC, + BUILTIN_ROLES.PUBLIC, + ] ctx.body = [...staticRoles, ...customRoles] }