mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-08 21:15:17 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -62,8 +62,9 @@ export const AdvancedEnvironmentSelector = ({
|
|||||||
const { data: currentUser } = api.user.get.useQuery();
|
const { data: currentUser } = api.user.get.useQuery();
|
||||||
|
|
||||||
// Check if user can delete environments
|
// Check if user can delete environments
|
||||||
const canDeleteEnvironments = currentUser?.role === "owner" ||
|
const canDeleteEnvironments =
|
||||||
currentUser?.role === "admin" ||
|
currentUser?.role === "owner" ||
|
||||||
|
currentUser?.role === "admin" ||
|
||||||
currentUser?.canDeleteEnvironments === true;
|
currentUser?.canDeleteEnvironments === true;
|
||||||
|
|
||||||
// Form states
|
// Form states
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ export const checkEnvironmentDeletionPermission = async (
|
|||||||
organizationId: string,
|
organizationId: string,
|
||||||
) => {
|
) => {
|
||||||
const member = await findMemberById(userId, organizationId);
|
const member = await findMemberById(userId, organizationId);
|
||||||
|
|
||||||
if (!member) {
|
if (!member) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
|
|||||||
Reference in New Issue
Block a user