feat: implement DASHBOARD_ORIGIN for invite and email links, enhancing self-hosted configuration and updating related documentation
This commit is contained in:
@@ -11,7 +11,6 @@ import { isUserOrgAdmin } from '@cio/db/queries/organization';
|
||||
export const orgAdminMiddleware = async (c: Context, next: Next) => {
|
||||
try {
|
||||
const user = c.get('user');
|
||||
console.log('orgAdminMiddleware user', user);
|
||||
if (!user) {
|
||||
return c.json(
|
||||
{
|
||||
@@ -24,7 +23,6 @@ export const orgAdminMiddleware = async (c: Context, next: Next) => {
|
||||
}
|
||||
|
||||
const orgId = c.req.header('cio-org-id');
|
||||
console.log('orgAdminMiddleware orgId', orgId);
|
||||
|
||||
if (!orgId) {
|
||||
return c.json(
|
||||
@@ -38,7 +36,6 @@ export const orgAdminMiddleware = async (c: Context, next: Next) => {
|
||||
}
|
||||
|
||||
const isAdmin = await isUserOrgAdmin(orgId, user.id);
|
||||
console.log('orgAdminMiddleware isAdmin', isAdmin);
|
||||
if (!isAdmin) {
|
||||
return c.json(
|
||||
{
|
||||
|
||||
@@ -10,7 +10,6 @@ import { getUserOrgRole } from '@cio/db/queries/organization';
|
||||
*/
|
||||
export const orgMemberMiddleware = async (c: Context, next: Next) => {
|
||||
try {
|
||||
console.log('user', c.get('user'));
|
||||
const user = c.get('user');
|
||||
if (!user) {
|
||||
return c.json(
|
||||
|
||||
@@ -10,8 +10,6 @@ import { isUserOrgTeamMember } from '@cio/db/queries/organization';
|
||||
*/
|
||||
export const orgTeamMemberMiddleware = async (c: Context, next: Next) => {
|
||||
try {
|
||||
console.log('orgTeamMemberMiddleware user', c.get('user'));
|
||||
|
||||
const user = c.get('user');
|
||||
if (!user) {
|
||||
return c.json(
|
||||
|
||||
Reference in New Issue
Block a user