Skip to content

Commit d4e377a

Browse files
committed
Removed notifications related to user quota for administrator accounts
1 parent 4a65ed3 commit d4e377a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/[locale]/dashboard/actions/file-upload.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,11 @@ export async function uploadFiles(
392392

393393
// On ajoute une notification à l'utilisateur si le quota de
394394
// celui-ci est proche d'être dépassé ou s'il est dépassé.
395+
// Note : cela ne concerne pas les administrateurs.
395396
const quotaIsNear = currentQuota > maxQuota * 0.9;
396397
const quotaIsExceeded = currentQuota > maxQuota;
397398

398-
if ( quotaIsNear || quotaIsExceeded )
399+
if ( session.user.role !== "admin" && ( quotaIsNear || quotaIsExceeded ) )
399400
{
400401
logger.warn(
401402
{ source: __filename, currentQuota, maxQuota },

0 commit comments

Comments
 (0)