mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-20 06:35:22 +02:00
refactor: update permissions handling to extract services from environments, improving data structure and clarity in user permissions management
This commit is contained in:
@@ -334,7 +334,7 @@ export const AddUserPermissions = ({ userId }: Props) => {
|
||||
)}
|
||||
<div className="grid md:grid-cols-2 gap-4">
|
||||
{projects?.map((item, index) => {
|
||||
const applications = extractServices(item);
|
||||
const applications = item.environments.flatMap(env => extractServices(env));
|
||||
return (
|
||||
<FormField
|
||||
key={`project-${index}`}
|
||||
|
||||
@@ -28,7 +28,7 @@ import { api } from "@/utils/api";
|
||||
|
||||
type Project = Awaited<ReturnType<typeof findProjectById>>;
|
||||
|
||||
type Environment = Awaited<ReturnType<typeof findEnvironmentById>>;
|
||||
type Environment = Omit<Awaited<ReturnType<typeof findEnvironmentById>>, "project"> ;
|
||||
|
||||
export type Services = {
|
||||
appName: string;
|
||||
|
||||
Reference in New Issue
Block a user