mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-27 07:22:17 +00:00
feat(ai): update AI settings to use organization-based access control
- Refactor AI-related schemas and services to use organizationId instead of adminId - Update AI router to check organization-level permissions - Modify AI settings creation and retrieval to work with organization context - Adjust server-side props and access checks for AI settings
This commit is contained in:
@@ -28,6 +28,9 @@ export const findUserById = async (userId: string) => {
|
||||
export const findOrganizationById = async (organizationId: string) => {
|
||||
const organizationResult = await db.query.organization.findFirst({
|
||||
where: eq(organization.id, organizationId),
|
||||
with: {
|
||||
owner: true,
|
||||
},
|
||||
});
|
||||
return organizationResult;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user