Add User Groups (a.k.a. RBAC) (#4)

This commit is contained in:
Chris Weaver
2023-10-09 09:45:07 -07:00
parent 92de6acc6f
commit 7503f8f37b
43 changed files with 2121 additions and 23 deletions

View File

@@ -9,17 +9,31 @@ const nextConfig = {
output: "standalone",
swcMinify: true,
rewrites: async () => {
const eeRedirects =
process.env.NEXT_PUBLIC_EE_ENABLED === "true"
? [
{
source: "/admin/groups",
destination: "/ee/admin/groups",
},
{
source: "/admin/groups/:path*",
destination: "/ee/admin/groups/:path*",
},
]
: [];
// In production, something else (nginx in the one box setup) should take
// care of this rewrite. TODO (chris): better support setups where
// web_server and api_server are on different machines.
if (process.env.NODE_ENV === "production") return [];
if (process.env.NODE_ENV === "production") return eeRedirects;
return [
{
source: "/api/:path*",
destination: "http://127.0.0.1:8080/:path*", // Proxy to Backend
},
];
].concat(eeRedirects);
},
redirects: async () => {
// In production, something else (nginx in the one box setup) should take