Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions Core/Resgrid.Config/AttachmentScanningConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
namespace Resgrid.Config
{
/// <summary>
/// Malware scanning for Records attachments (RMS plan section 4.7) through a clamd daemon. Off by default:
/// with scanning disabled every attachment is stored as Skipped, exactly as with no scanner registered.
/// Environment keys: RESGRID:AttachmentScanningConfig:Enabled, :Host, :Port, :TimeoutSeconds, :FailClosed.
/// </summary>
public static class AttachmentScanningConfig
{
/// <summary>Master switch. When false the scanner never opens a connection.</summary>
public static bool Enabled = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Mutable configuration state in Core/Resgrid.Config/AttachmentScanningConfig.cs because public static bool Enabled = false; declares immutable metadata as a writable field. Mark it const, as shown, or readonly if runtime assignment is required.

Kody rule violation: Use `readonly` or `const` for Immutable Data

public const bool Enabled = false;
Prompt for LLM

File Core/Resgrid.Config/AttachmentScanningConfig.cs:

Line 11:

Mutable configuration state in Core/Resgrid.Config/AttachmentScanningConfig.cs because public static bool Enabled = false; declares immutable metadata as a writable field. Mark it const, as shown, or readonly if runtime assignment is required.

Suggested Code:

		public const bool Enabled = false;

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.


/// <summary>clamd host (the ClamAV service name inside the compose/k8s network).</summary>
public static string Host = "clamav";

/// <summary>clamd TCP port.</summary>
public static int Port = 3310;

/// <summary>Connect, stream and reply budget for one scan.</summary>
public static int TimeoutSeconds = 30;

/// <summary>INSTREAM chunk size in bytes.</summary>
public static int ChunkSize = 64 * 1024;

/// <summary>
/// What an unreachable or erroring engine means for the upload: true rejects the attachment (the safe
/// default for a records system), false stores it as Pending with the reason on the row.
/// </summary>
public static bool FailClosed = true;
}
}
28 changes: 28 additions & 0 deletions Core/Resgrid.Config/SearchConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace Resgrid.Config
{
/// <summary>
/// Shared Lucene.NET search host (Unified Search plan section 9.2, absorbed by RMS-1). Off by default: with the
/// host disabled the Records queue keeps running on the indexed projection table and free-text search is
/// reported as unavailable rather than silently degrading to LIKE.
/// </summary>
public static class SearchConfig
{
/// <summary>Master switch for the search host in every process.</summary>
public static bool Enabled = false;

/// <summary>Root directory shared by the API/Web reader and the worker writer (Docker volume).</summary>
public static string IndexPath = "/data/search";

/// <summary>Hard limit on hits a single query may return.</summary>
public static int MaxResults = 200;

/// <summary>IndexWriter RAM buffer before a flush.</summary>
public static int RamBufferSizeMb = 16;

/// <summary>Rows fetched per page while rebuilding or catching up a department.</summary>
public static int IndexBatchSize = 500;

/// <summary>Maximum departments one maintenance sweep rebuilds before yielding to the next run.</summary>
public static int MaxRebuildsPerSweep = 5;
}
}
93 changes: 93 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Department/Department.ar.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1050,4 +1050,97 @@
<data name="UnitStatusBaseType_8" xml:space="preserve">
<value>عائدة</value>
</data>
<data name="DepartmentProfileHeader" xml:space="preserve">
<value>ملف القسم</value>
</data>
<data name="ProfileIntro" xml:space="preserve">
<value>هذه هي الهوية التي يطبعها Resgrid على السجلات ويعرضها في الرسائل ذات العلامة التجارية ويستخدمها أينما يقدّم القسم نفسه. اترك الحقل فارغًا للرجوع إلى إعدادات القسم.</value>
</data>
<data name="ProfileIdentity" xml:space="preserve">
<value>الهوية</value>
</data>
<data name="ProfileDisplayName" xml:space="preserve">
<value>الاسم المعروض</value>
</data>
<data name="ProfileShortName" xml:space="preserve">
<value>الاسم المختصر</value>
</data>
<data name="ProfileCode" xml:space="preserve">
<value>الرمز</value>
</data>
<data name="ProfileDescription" xml:space="preserve">
<value>الوصف</value>
</data>
<data name="ProfilePhone" xml:space="preserve">
<value>رقم الهاتف</value>
</data>
<data name="ProfileWebsite" xml:space="preserve">
<value>الموقع الإلكتروني</value>
</data>
<data name="ProfileAddress" xml:space="preserve">
<value>العنوان</value>
</data>
<data name="ProfileAddressNote" xml:space="preserve">
<value>العنوان المطبوع على السجلات والرسائل هو عنوان القسم:</value>
</data>
<data name="ProfileSocial" xml:space="preserve">
<value>روابط التواصل الاجتماعي</value>
</data>
<data name="ProfileLogo" xml:space="preserve">
<value>الشعار</value>
</data>
<data name="ProfileLogoHelp" xml:space="preserve">
<value>PNG أو JPEG بحجم يصل إلى 2 ميغابايت وبعرض 200 بكسل على الأقل على الضلع الأطول (يُنصح بـ 512 بكسل أو أكثر). يُعاد ترميز الملف مع إزالة بياناته الوصفية، وتُنشأ منه نسخ رأس الطباعة ورأس البريد والصورة المصغّرة.</value>
</data>
<data name="ProfileUpload" xml:space="preserve">
<value>رفع الشعار</value>
</data>
<data name="ProfileRemoveLogo" xml:space="preserve">
<value>إزالة الشعار</value>
</data>
<data name="ProfileNoLogo" xml:space="preserve">
<value>لم يُرفع أي شعار. تستخدم المطبوعات والرسائل اسم القسم فقط.</value>
</data>
<data name="ProfileRenditionPrint" xml:space="preserve">
<value>رأس الطباعة</value>
</data>
<data name="ProfileRenditionEmail" xml:space="preserve">
<value>رأس البريد</value>
</data>
<data name="ProfileRenditionThumb" xml:space="preserve">
<value>صورة مصغّرة</value>
</data>
<data name="ProfileUseBrandingInEmails" xml:space="preserve">
<value>استخدام رأس القسم في الرسائل التشغيلية</value>
</data>
<data name="ProfileUseBrandingInEmailsHelp" xml:space="preserve">
<value>تعرض رسائل النداءات والرسائل وتسليم التقارير وسير العمل شعارك واسمك بدلًا من رأس Resgrid؛ وتُرسل إشعارات السجلات باسم «اسم الجهة via Resgrid». تبقى رسائل الحساب والفوترة دائمًا بعلامة Resgrid.</value>
</data>
<data name="ProfileMediaKey" xml:space="preserve">
<value>الرابط العام للرأس</value>
</data>
<data name="ProfileMediaKeyHelp" xml:space="preserve">
<value>لا يمكن لبرامج البريد تسجيل الدخول، لذا يُقدَّم الرأس عبر هذا الرابط الذي لا يمكن تخمينه. تؤدي إعادة إنشائه إلى إبطال الصورة في كل رسالة أُرسلت من قبل.</value>
</data>
<data name="ProfileRegenerateKey" xml:space="preserve">
<value>إعادة إنشاء الرابط</value>
</data>
<data name="ProfileSaved" xml:space="preserve">
<value>تم حفظ ملف القسم.</value>
</data>
<data name="ProfileLogoSaved" xml:space="preserve">
<value>تم رفع الشعار وإنشاء النسخ.</value>
</data>
<data name="ProfileLogoRemoved" xml:space="preserve">
<value>تمت إزالة الشعار.</value>
</data>
<data name="ProfileLogoRequired" xml:space="preserve">
<value>اختر ملف PNG أو JPEG لرفعه.</value>
</data>
<data name="ProfileKeyRegenerated" xml:space="preserve">
<value>صدر رابط رأس جديد؛ لن تعرض الرسائل المرسلة سابقًا الشعار بعد الآن.</value>
</data>
<data name="ProfileSaveFailed" xml:space="preserve">
<value>تعذّر حفظ الملف؛ راجع الحقول المميّزة.</value>
</data>
</root>
93 changes: 93 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Department/Department.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1001,4 +1001,97 @@
<data name="UnitStatusBaseType_8" xml:space="preserve">
<value>Rückfahrt</value>
</data>
<data name="DepartmentProfileHeader" xml:space="preserve">
<value>Abteilungsprofil</value>
</data>
<data name="ProfileIntro" xml:space="preserve">
<value>Dies ist die Identität, die Resgrid auf Berichte druckt, in gebrandeten E-Mails zeigt und überall verwendet, wo sich die Abteilung präsentiert. Lassen Sie ein Feld leer, um auf die Abteilungseinstellungen zurückzugreifen.</value>
</data>
<data name="ProfileIdentity" xml:space="preserve">
<value>Identität</value>
</data>
<data name="ProfileDisplayName" xml:space="preserve">
<value>Anzeigename</value>
</data>
<data name="ProfileShortName" xml:space="preserve">
<value>Kurzname</value>
</data>
<data name="ProfileCode" xml:space="preserve">
<value>Kennung</value>
</data>
<data name="ProfileDescription" xml:space="preserve">
<value>Beschreibung</value>
</data>
<data name="ProfilePhone" xml:space="preserve">
<value>Telefonnummer</value>
</data>
<data name="ProfileWebsite" xml:space="preserve">
<value>Website</value>
</data>
<data name="ProfileAddress" xml:space="preserve">
<value>Adresse</value>
</data>
<data name="ProfileAddressNote" xml:space="preserve">
<value>Die auf Berichten und E-Mails gedruckte Adresse ist die Abteilungsadresse:</value>
</data>
<data name="ProfileSocial" xml:space="preserve">
<value>Soziale Netzwerke</value>
</data>
<data name="ProfileLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="ProfileLogoHelp" xml:space="preserve">
<value>PNG oder JPEG, bis 2 MB, mindestens 200 px an der langen Kante (512 px oder mehr empfohlen). Der Upload wird ohne Metadaten neu kodiert; daraus entstehen die Varianten für Druckkopf, E-Mail-Kopfzeile und Miniaturbild.</value>
</data>
<data name="ProfileUpload" xml:space="preserve">
<value>Logo hochladen</value>
</data>
<data name="ProfileRemoveLogo" xml:space="preserve">
<value>Logo entfernen</value>
</data>
<data name="ProfileNoLogo" xml:space="preserve">
<value>Es wurde kein Logo hochgeladen. Ausdrucke und E-Mails verwenden nur den Abteilungsnamen.</value>
</data>
<data name="ProfileRenditionPrint" xml:space="preserve">
<value>Druckkopf</value>
</data>
<data name="ProfileRenditionEmail" xml:space="preserve">
<value>E-Mail-Kopfzeile</value>
</data>
<data name="ProfileRenditionThumb" xml:space="preserve">
<value>Miniaturbild</value>
</data>
<data name="ProfileUseBrandingInEmails" xml:space="preserve">
<value>Abteilungs-Kopfzeile in operativen E-Mails verwenden</value>
</data>
<data name="ProfileUseBrandingInEmailsHelp" xml:space="preserve">
<value>E-Mails zu Einsätzen, Nachrichten, Berichtszustellung und Workflows zeigen Ihr Logo und Ihren Namen statt der Resgrid-Kopfzeile; Benachrichtigungen zu Berichten werden als „Abteilungsname via Resgrid“ gesendet. Konto- und Abrechnungs-E-Mails bleiben immer Resgrid-gebrandet.</value>
</data>
<data name="ProfileMediaKey" xml:space="preserve">
<value>Öffentlicher Kopfzeilen-Link</value>
</data>
<data name="ProfileMediaKeyHelp" xml:space="preserve">
<value>E-Mail-Programme können sich nicht anmelden, daher wird die Kopfzeile über diesen nicht erratbaren Link ausgeliefert. Beim Neuerzeugen wird das Bild in allen bereits gesendeten E-Mails ungültig.</value>
</data>
<data name="ProfileRegenerateKey" xml:space="preserve">
<value>Link neu erzeugen</value>
</data>
<data name="ProfileSaved" xml:space="preserve">
<value>Abteilungsprofil gespeichert.</value>
</data>
<data name="ProfileLogoSaved" xml:space="preserve">
<value>Logo hochgeladen und Varianten erzeugt.</value>
</data>
<data name="ProfileLogoRemoved" xml:space="preserve">
<value>Logo entfernt.</value>
</data>
<data name="ProfileLogoRequired" xml:space="preserve">
<value>Wählen Sie eine PNG- oder JPEG-Datei zum Hochladen.</value>
</data>
<data name="ProfileKeyRegenerated" xml:space="preserve">
<value>Ein neuer Kopfzeilen-Link wurde ausgestellt; bereits gesendete E-Mails zeigen das Logo nicht mehr.</value>
</data>
<data name="ProfileSaveFailed" xml:space="preserve">
<value>Das Profil konnte nicht gespeichert werden; prüfen Sie die markierten Felder.</value>
</data>
</root>
93 changes: 93 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Department/Department.el.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1080,4 +1080,97 @@
<data name="UnitStatusBaseType_8" xml:space="preserve">
<value>Επιστροφή</value>
</data>
<data name="DepartmentProfileHeader" xml:space="preserve">
<value>Προφίλ υπηρεσίας</value>
</data>
<data name="ProfileIntro" xml:space="preserve">
<value>Αυτή είναι η ταυτότητα που το Resgrid εκτυπώνει στις αναφορές, εμφανίζει στα επώνυμα email και χρησιμοποιεί όπου παρουσιάζεται η υπηρεσία. Αφήστε ένα πεδίο κενό για να χρησιμοποιηθούν οι ρυθμίσεις της υπηρεσίας.</value>
</data>
<data name="ProfileIdentity" xml:space="preserve">
<value>Ταυτότητα</value>
</data>
<data name="ProfileDisplayName" xml:space="preserve">
<value>Εμφανιζόμενο όνομα</value>
</data>
<data name="ProfileShortName" xml:space="preserve">
<value>Σύντομο όνομα</value>
</data>
<data name="ProfileCode" xml:space="preserve">
<value>Κωδικός</value>
</data>
<data name="ProfileDescription" xml:space="preserve">
<value>Περιγραφή</value>
</data>
<data name="ProfilePhone" xml:space="preserve">
<value>Αριθμός τηλεφώνου</value>
</data>
<data name="ProfileWebsite" xml:space="preserve">
<value>Ιστότοπος</value>
</data>
<data name="ProfileAddress" xml:space="preserve">
<value>Διεύθυνση</value>
</data>
<data name="ProfileAddressNote" xml:space="preserve">
<value>Η διεύθυνση που εκτυπώνεται σε αναφορές και email είναι η διεύθυνση της υπηρεσίας:</value>
</data>
<data name="ProfileSocial" xml:space="preserve">
<value>Κοινωνικά δίκτυα</value>
</data>
<data name="ProfileLogo" xml:space="preserve">
<value>Λογότυπο</value>
</data>
<data name="ProfileLogoHelp" xml:space="preserve">
<value>PNG ή JPEG, έως 2 MB, τουλάχιστον 200 px στη μεγάλη πλευρά (συνιστώνται 512 px ή περισσότερα). Το αρχείο επανακωδικοποιείται χωρίς μεταδεδομένα και από αυτό δημιουργούνται οι εκδοχές για κεφαλίδα εκτύπωσης, κεφαλίδα email και μικρογραφία.</value>
</data>
<data name="ProfileUpload" xml:space="preserve">
<value>Μεταφόρτωση λογοτύπου</value>
</data>
<data name="ProfileRemoveLogo" xml:space="preserve">
<value>Αφαίρεση λογοτύπου</value>
</data>
<data name="ProfileNoLogo" xml:space="preserve">
<value>Δεν έχει μεταφορτωθεί λογότυπο. Οι εκτυπώσεις και τα email χρησιμοποιούν μόνο το όνομα της υπηρεσίας.</value>
</data>
<data name="ProfileRenditionPrint" xml:space="preserve">
<value>Κεφαλίδα εκτύπωσης</value>
</data>
<data name="ProfileRenditionEmail" xml:space="preserve">
<value>Κεφαλίδα email</value>
</data>
<data name="ProfileRenditionThumb" xml:space="preserve">
<value>Μικρογραφία</value>
</data>
<data name="ProfileUseBrandingInEmails" xml:space="preserve">
<value>Χρήση της κεφαλίδας της υπηρεσίας στα επιχειρησιακά email</value>
</data>
<data name="ProfileUseBrandingInEmailsHelp" xml:space="preserve">
<value>Τα email για κλήσεις, μηνύματα, παράδοση αναφορών και ροές εργασίας εμφανίζουν το λογότυπο και το όνομά σας αντί για την κεφαλίδα του Resgrid· οι ειδοποιήσεις αναφορών αποστέλλονται ως «όνομα υπηρεσίας via Resgrid». Τα email λογαριασμού και χρέωσης παραμένουν πάντα με την επωνυμία Resgrid.</value>
</data>
<data name="ProfileMediaKey" xml:space="preserve">
<value>Δημόσιος σύνδεσμος κεφαλίδας</value>
</data>
<data name="ProfileMediaKeyHelp" xml:space="preserve">
<value>Οι εφαρμογές email δεν μπορούν να συνδεθούν, οπότε η κεφαλίδα σερβίρεται από αυτόν τον μη προβλέψιμο σύνδεσμο. Η αναδημιουργία του ακυρώνει την εικόνα σε κάθε email που έχει ήδη σταλεί.</value>
</data>
<data name="ProfileRegenerateKey" xml:space="preserve">
<value>Αναδημιουργία συνδέσμου</value>
</data>
<data name="ProfileSaved" xml:space="preserve">
<value>Το προφίλ της υπηρεσίας αποθηκεύτηκε.</value>
</data>
<data name="ProfileLogoSaved" xml:space="preserve">
<value>Το λογότυπο μεταφορτώθηκε και οι εκδοχές δημιουργήθηκαν.</value>
</data>
<data name="ProfileLogoRemoved" xml:space="preserve">
<value>Το λογότυπο αφαιρέθηκε.</value>
</data>
<data name="ProfileLogoRequired" xml:space="preserve">
<value>Επιλέξτε αρχείο PNG ή JPEG για μεταφόρτωση.</value>
</data>
<data name="ProfileKeyRegenerated" xml:space="preserve">
<value>Εκδόθηκε νέος σύνδεσμος κεφαλίδας· τα email που έχουν ήδη σταλεί δεν θα εμφανίζουν πλέον το λογότυπο.</value>
</data>
<data name="ProfileSaveFailed" xml:space="preserve">
<value>Το προφίλ δεν ήταν δυνατό να αποθηκευτεί· ελέγξτε τα επισημασμένα πεδία.</value>
</data>
</root>
Loading
Loading