mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-24 20:58:46 +00:00
fix(security): check service access before server in wss authz, and pass serviceId from log views
- Reorder canAccessDockerOverWss: docker permission -> service access (if serviceId) -> server access, so the service grant is the primary signal. - Pass serviceId from the service log views (application + postgres/mysql/mariadb/ mongo/redis/libsql + compose) so container logs opened from a service page are gated by checkServiceAccess, matching the terminal path.
This commit is contained in:
@@ -35,12 +35,14 @@ interface Props {
|
||||
appName: string;
|
||||
serverId?: string;
|
||||
appType: "stack" | "docker-compose";
|
||||
serviceId?: string;
|
||||
}
|
||||
|
||||
export const ShowDockerLogsCompose = ({
|
||||
appName,
|
||||
appType,
|
||||
serverId,
|
||||
serviceId,
|
||||
}: Props) => {
|
||||
const { data, isPending } = api.docker.getContainersByAppNameMatch.useQuery(
|
||||
{
|
||||
@@ -104,6 +106,7 @@ export const ShowDockerLogsCompose = ({
|
||||
serverId={serverId || ""}
|
||||
containerId={containerId || "select-a-container"}
|
||||
runType="native"
|
||||
serviceId={serviceId}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user