add EDITOR, VIEWER as default roles

This commit is contained in:
Sidney Alcantara
2022-03-17 10:41:42 +11:00
parent a967c2b654
commit 46e611b34d

View File

@@ -166,7 +166,12 @@ export const ProjectContextProvider: React.FC = ({ children }) => {
() =>
Array.isArray(tables)
? Array.from(
new Set(tables.reduce((a, c) => [...a, ...c.roles], ["ADMIN"]))
new Set(
tables.reduce(
(a, c) => [...a, ...c.roles],
["ADMIN", "EDITOR", "VIEWER"]
)
)
)
: [],
[tables]