Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/containers/ActionSheet/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Item = React.memo(({ item, hide }: IActionSheetItem) => {
hide();
item?.onPress();
} else {
EventEmitter.emit(LISTENER, { message: I18n.t('You_dont_have_permission_to_perform_this_action') });
EventEmitter.emit(LISTENER, { message: item?.disabledReason || I18n.t('You_dont_have_permission_to_perform_this_action') });
}
};

Expand Down
1 change: 1 addition & 0 deletions app/containers/ActionSheet/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type TActionSheetOptionsItem = {
onPress: () => void;
right?: () => React.ReactElement;
enabled?: boolean;
disabledReason?: string;
};

export type TActionSheetOptions = {
Expand Down
14 changes: 10 additions & 4 deletions app/containers/MessageActions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
});
};

const getOptions = (message: TAnyMessageModel) => {

Check warning on line 396 in app/containers/MessageActions/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint and Test / run-eslint-and-test

Arrow function has a complexity of 36. Maximum allowed is 31
const options: TActionSheetOptionsItem[] = [];
const videoConfBlock = message.t === 'videoconf';

Expand Down Expand Up @@ -442,7 +442,8 @@
title: I18n.t('Reply_in_direct_message'),
icon: 'arrow-back',
onPress: () => handleReplyInDM(message),
enabled: permissions.hasCreateDirectMessagePermission
enabled: permissions.hasCreateDirectMessagePermission && !room.abacAttributes,
disabledReason: room.abacAttributes && I18n.t('ABAC_disabled_action_reason')
});
}

Expand All @@ -454,19 +455,24 @@
enabled: permissions.hasCreateDiscussionOtherUserPermission
});

// Forward
if (compareServerVersion(serverVersion, 'greaterThanOrEqualTo', '6.2.0') && !videoConfBlock) {
options.push({
title: I18n.t('Forward'),
icon: 'arrow-forward',
onPress: () => handleShareMessage(message)
onPress: () => handleShareMessage(message),
enabled: !room.abacAttributes,
disabledReason: room.abacAttributes && I18n.t('ABAC_disabled_action_reason')
});
}

// Permalink
// Get link
options.push({
title: I18n.t('Get_link'),
icon: 'link',
onPress: () => handlePermalink(message)
onPress: () => handlePermalink(message),
enabled: !room.abacAttributes,
disabledReason: room.abacAttributes && I18n.t('ABAC_disabled_action_reason')
});

// Copy
Expand Down
9 changes: 5 additions & 4 deletions app/i18n/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"A11y_in_app_notification": "رسالة جديدة من {{name}}: {{message}}",
"A11y_incoming_call_dismiss": "تجاهل",
"A11y_incoming_call_swipe_down_to_view_options": "اسحب لأسفل لعرض الخيارات",
"ABAC_disabled_action_reason": "غير متاح في الغرف المدارة بواسطة ABAC",
"ABAC_managed": "مدار بواسطة ABAC",
"ABAC_managed_description": "فقط المستخدمون المتوافقون لديهم حق الوصول إلى الغرف التي يتم التحكم فيها بالوصول المستند إلى السمات. تحدد السمات الوصول إلى الغرفة.",
"ABAC_room_attributes": "سمات الغرفة",
"Accessibility": "إمكانية الوصول",
"Accessibility_and_Appearance": "إمكانية الوصول والمظهر",
"Accessibility_statement": "بيان الوصول",
Expand Down Expand Up @@ -629,8 +633,5 @@
"Your_invite_link_will_never_expire": "لن تنتهي صلاحية رابط الدعوة الخاص بك",
"Your_password_is": "كلمة المرور الخاصة بك هي",
"Your_Password_Must_Have": "يجب أن تحتوي كلمة المرور الخاصة بك على:",
"Your_workspace": "مساحة عملك",
"ABAC_room_attributes": "سمات الغرفة",
"ABAC_managed": "مدار بواسطة ABAC",
"ABAC_managed_description": "فقط المستخدمون المتوافقون لديهم حق الوصول إلى الغرف التي يتم التحكم فيها بالوصول المستند إلى السمات. تحدد السمات الوصول إلى الغرفة."
"Your_workspace": "مساحة عملك"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"A11y_in_app_notification": "{{name}} থেকে নতুন বার্তা: {{message}}",
"A11y_incoming_call_dismiss": "বন্ধ করুন",
"A11y_incoming_call_swipe_down_to_view_options": "নির্বাচনগুলি দেখতে নিচে সোয়াইপ করুন",
"ABAC_disabled_action_reason": "ABAC-পরিচালিত রুমগুলিতে উপলব্ধ নয়",
"ABAC_managed": "ABAC দ্বারা পরিচালিত",
"ABAC_managed_description": "শুধুমাত্র অনুগত ব্যবহারকারীদের অ্যাট্রিবিউট-ভিত্তিক অ্যাক্সেস নিয়ন্ত্রিত রুমগুলিতে অ্যাক্সেস আছে। অ্যাট্রিবিউটগুলি রুমের অ্যাক্সেস নির্ধারণ করে।",
"ABAC_room_attributes": "রুমের বৈশিষ্ট্য",
"accept": "গ্রহণ করুন",
"Accessibility": "অ্যাক্সেসিবিলিটি",
"Accessibility_and_Appearance": "অ্যাক্সেসিবিলিটি ও চেহারা",
Expand Down Expand Up @@ -892,8 +896,5 @@
"Your_invite_link_will_never_expire": "আপনার আমন্ত্রণ লিঙ্কটি কখনও মেয়াদ শেষ হবে না।",
"Your_password_is": "আপনার পাসওয়ার্ড হল",
"Your_Password_Must_Have": "আপনার পাসওয়ার্ড থাকতে হবে:",
"Your_workspace": "আপনার ওয়ার্কস্পেস",
"ABAC_room_attributes": "রুমের বৈশিষ্ট্য",
"ABAC_managed": "ABAC দ্বারা পরিচালিত",
"ABAC_managed_description": "শুধুমাত্র অনুগত ব্যবহারকারীদের অ্যাট্রিবিউট-ভিত্তিক অ্যাক্সেস নিয়ন্ত্রিত রুমগুলিতে অ্যাক্সেস আছে। অ্যাট্রিবিউটগুলি রুমের অ্যাক্সেস নির্ধারণ করে।"
"Your_workspace": "আপনার ওয়ার্কস্পেস"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"A11y_in_app_notification": "Nová zpráva od {{name}}: {{message}}",
"A11y_incoming_call_dismiss": "Zavřít",
"A11y_incoming_call_swipe_down_to_view_options": "Přejetím dolů zobrazíte možnosti",
"ABAC_disabled_action_reason": "Není k dispozici v místnostech spravovaných systémem ABAC",
"ABAC_managed": "Spravováno ABAC",
"ABAC_managed_description": "Pouze vyhovující uživatelé mají přístup k místnostem řízeným přístupem na základě atributů. Atributy určují přístup k místnosti.",
"ABAC_room_attributes": "Atributy místnosti",
"accept": "Akceptovat",
"Accessibility": "Přístupnost",
"Accessibility_and_Appearance": "Přístupnost a vzhled",
Expand Down Expand Up @@ -967,8 +971,5 @@
"Your_password_is": "Vaše heslo je",
"Your_Password_Must_Have": "Vaše heslo musí mít:",
"Your_push_was_sent_to_s_devices": "Vaše push byla odeslána do {{s}} zařízení",
"Your_workspace": "Váš pracovní prostor",
"ABAC_room_attributes": "Atributy místnosti",
"ABAC_managed": "Spravováno ABAC",
"ABAC_managed_description": "Pouze vyhovující uživatelé mají přístup k místnostem řízeným přístupem na základě atributů. Atributy určují přístup k místnosti."
"Your_workspace": "Váš pracovní prostor"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"A11y_in_app_notification": "Neue Nachricht von {{name}}: {{message}}",
"A11y_incoming_call_dismiss": "Verwerfen",
"A11y_incoming_call_swipe_down_to_view_options": "Nach unten wischen, um Optionen anzuzeigen",
"ABAC_disabled_action_reason": "Nicht verfügbar in ABAC-verwalteten Räumen",
"ABAC_managed": "ABAC verwaltet",
"ABAC_managed_description": "Nur konforme Benutzer haben Zugriff auf attributbasierte zugriffsgesteuerte Räume. Attribute bestimmen den Raumzugriff.",
"ABAC_room_attributes": "Raumattribute",
"accept": "Annehmen",
"Accessibility": "Barrierefreiheit",
"Accessibility_and_Appearance": "Barrierefreiheit & Erscheinungsbild",
Expand Down Expand Up @@ -882,8 +886,5 @@
"Your_invite_link_will_never_expire": "Ihr Einladungs-Link wird niemals ablaufen.",
"Your_password_is": "Ihr Passwort lautet",
"Your_Password_Must_Have": "Ihr Passwort muss:",
"Your_workspace": "Ihr Arbeitsbereich",
"ABAC_room_attributes": "Raumattribute",
"ABAC_managed": "ABAC verwaltet",
"ABAC_managed_description": "Nur konforme Benutzer haben Zugriff auf attributbasierte zugriffsgesteuerte Räume. Attribute bestimmen den Raumzugriff."
"Your_workspace": "Ihr Arbeitsbereich"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"A11y_in_app_notification": "New message from {{name}}: {{message}}",
"A11y_incoming_call_dismiss": "Dismiss",
"A11y_incoming_call_swipe_down_to_view_options": "Swipe down to view options",
"ABAC_disabled_action_reason": "Not available in ABAC-managed rooms",
"ABAC_managed": "ABAC managed",
"ABAC_managed_description": "Only compliant users have access to attribute-based access controlled rooms. Attributes determine room access.",
"ABAC_room_attributes": "Room attributes",
"accept": "Accept",
"Accessibility": "Accessibility",
"Accessibility_and_Appearance": "Accessibility & appearance",
Expand Down Expand Up @@ -995,8 +999,5 @@
"Your_invite_link_will_never_expire": "Your invite link will never expire.",
"Your_password_is": "Your password is",
"Your_Password_Must_Have": "Your password must have:",
"Your_push_was_sent_to_s_devices": "Your push was sent to {{s}} devices",
"ABAC_room_attributes": "Room attributes",
"ABAC_managed": "ABAC managed",
"ABAC_managed_description": "Only compliant users have access to attribute-based access controlled rooms. Attributes determine room access."
"Your_push_was_sent_to_s_devices": "Your push was sent to {{s}} devices"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"A11y_in_app_notification": "Nuevo mensaje de {{name}}: {{message}}",
"A11y_incoming_call_dismiss": "Descartar",
"A11y_incoming_call_swipe_down_to_view_options": "Desliza hacia abajo para ver opciones",
"ABAC_disabled_action_reason": "No disponible en salas gestionadas por ABAC",
"ABAC_managed": "Gestionado por ABAC",
"ABAC_managed_description": "Solo los usuarios compatibles tienen acceso a las salas controladas por acceso basado en atributos. Los atributos determinan el acceso a la sala.",
"ABAC_room_attributes": "Atributos de la sala",
"Accessibility": "Accesibilidad",
"Accessibility_and_Appearance": "Accesibilidad y apariencia",
"Accessibility_statement": "Declaración de accesibilidad",
Expand Down Expand Up @@ -448,8 +452,5 @@
"you_were_mentioned": "has sido mencionado",
"You_will_not_be_able_to_recover_this_message": "¡No podrás recuperar este mensaje!",
"Your_certificate": "Tu certificado",
"Your_Password_Must_Have": "Su contraseña debe tener:",
"ABAC_room_attributes": "Atributos de la sala",
"ABAC_managed": "Gestionado por ABAC",
"ABAC_managed_description": "Solo los usuarios compatibles tienen acceso a las salas controladas por acceso basado en atributos. Los atributos determinan el acceso a la sala."
"Your_Password_Must_Have": "Su contraseña debe tener:"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"A11y_in_app_notification": "Uusi viesti {{name}}: {{message}}",
"A11y_incoming_call_dismiss": "Hylkää",
"A11y_incoming_call_swipe_down_to_view_options": "Pyyhkäise alas nähdäksesi vaihtoehdot",
"ABAC_disabled_action_reason": "Ei saatavilla ABAC-hallituissa huoneissa",
"ABAC_managed": "ABAC-hallittu",
"ABAC_managed_description": "Vain yhteensopivilla käyttäjillä on pääsy attribuuttipohjaisesti hallittuihin huoneisiin. Attribuutit määrittävät huoneen pääsyn.",
"ABAC_room_attributes": "Huoneen attribuutit",
"Accessibility": "Saavutettavuus",
"Accessibility_and_Appearance": "Saavutettavuus ja ulkonäkö",
"Accessibility_statement": "Saavutettavuusilmoitus",
Expand Down Expand Up @@ -854,8 +858,5 @@
"Your_invite_link_will_never_expire": "Kutsulinkkisi ei vanhene.",
"Your_password_is": "Salasanasi on",
"Your_Password_Must_Have": "Salasanasi on oltava:",
"Your_workspace": "Työtilasi",
"ABAC_room_attributes": "Huoneen attribuutit",
"ABAC_managed": "ABAC-hallittu",
"ABAC_managed_description": "Vain yhteensopivilla käyttäjillä on pääsy attribuuttipohjaisesti hallittuihin huoneisiin. Attribuutit määrittävät huoneen pääsyn."
"Your_workspace": "Työtilasi"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"A11y_in_app_notification": "Nouveau message de {{name}} : {{message}}",
"A11y_incoming_call_dismiss": "Ignorer",
"A11y_incoming_call_swipe_down_to_view_options": "Faites glisser vers le bas pour voir les options",
"ABAC_disabled_action_reason": "Non disponible dans les salles gérées par ABAC",
"ABAC_managed": "Géré par ABAC",
"ABAC_managed_description": "Seuls les utilisateurs conformes ont accès aux salles contrôlées par accès basé sur les attributs. Les attributs déterminent l'accès à la salle.",
"ABAC_room_attributes": "Attributs de la salle",
"Accessibility": "Accessibilité",
"Accessibility_and_Appearance": "Accessibilité et apparence",
"Accessibility_statement": "Déclaration d'accessibilité",
Expand Down Expand Up @@ -775,8 +779,5 @@
"Your_invite_link_will_never_expire": "Votre lien d'invitation n'expirera jamais.",
"Your_password_is": "Votre mot de passe est",
"Your_Password_Must_Have": "Votre mot de passe doit avoir:",
"Your_workspace": "Votre espace de travail",
"ABAC_room_attributes": "Attributs de la salle",
"ABAC_managed": "Géré par ABAC",
"ABAC_managed_description": "Seuls les utilisateurs conformes ont accès aux salles contrôlées par accès basé sur les attributs. Les attributs déterminent l'accès à la salle."
"Your_workspace": "Votre espace de travail"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"A11y_in_app_notification": "{{name}} से नया संदेश: {{message}}",
"A11y_incoming_call_dismiss": "खारिज करें",
"A11y_incoming_call_swipe_down_to_view_options": "विकल्प देखने के लिए नीचे स्वाइप करें",
"ABAC_disabled_action_reason": "ABAC-प्रबंधित कमरों में उपलब्ध नहीं है",
"ABAC_managed": "ABAC प्रबंधित",
"ABAC_managed_description": "केवल संगत उपयोगकर्ताओं के पास विशेषता-आधारित पहुँच नियंत्रित कमरों तक पहुँच है। विशेषताएँ कमरे तक पहुँच निर्धारित करती हैं।",
"ABAC_room_attributes": "कमरे के गुण",
"accept": "स्वीकार करें",
"Accessibility": "प्रवेशयोग्यता",
"Accessibility_and_Appearance": "प्रवेशयोग्यता और दृश्यता",
Expand Down Expand Up @@ -892,8 +896,5 @@
"Your_invite_link_will_never_expire": "आपका आमंत्रण लिंक कभी समाप्त नहीं होगा।",
"Your_password_is": "आपका पासवर्ड है",
"Your_Password_Must_Have": "आपका पासवर्ड होना चाहिए:",
"Your_workspace": "आपका कार्यस्थान",
"ABAC_room_attributes": "कमरे के गुण",
"ABAC_managed": "ABAC प्रबंधित",
"ABAC_managed_description": "केवल संगत उपयोगकर्ताओं के पास विशेषता-आधारित पहुँच नियंत्रित कमरों तक पहुँच है। विशेषताएँ कमरे तक पहुँच निर्धारित करती हैं।"
"Your_workspace": "आपका कार्यस्थान"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"A11y_in_app_notification": "Új üzenet érkezett {{name}}-tól: {{message}}",
"A11y_incoming_call_dismiss": "Elutasítás",
"A11y_incoming_call_swipe_down_to_view_options": "Húzza lefelé az opciók megtekintéséhez",
"ABAC_disabled_action_reason": "Nem érhető el ABAC által kezelt szobákban",
"ABAC_managed": "ABAC által kezelt",
"ABAC_managed_description": "Csak a megfelelő felhasználók férhetnek hozzá az attribútum alapú hozzáférés-vezérelt szobákhoz. Az attribútumok határozzák meg a szoba hozzáférését.",
"ABAC_room_attributes": "Szoba attribútumok",
"accept": "Elfogadom",
"Accessibility": "Akadálymentesség",
"Accessibility_and_Appearance": "Hozzáférhetőség és megjelenés",
Expand Down Expand Up @@ -895,8 +899,5 @@
"Your_invite_link_will_never_expire": "A meghívási hivatkozása sosem jár le.",
"Your_password_is": "A jelszava a következő",
"Your_Password_Must_Have": "A jelszavának rendelkeznie kell:",
"Your_workspace": "Az Ön munkaterülete",
"ABAC_room_attributes": "Szoba attribútumok",
"ABAC_managed": "ABAC által kezelt",
"ABAC_managed_description": "Csak a megfelelő felhasználók férhetnek hozzá az attribútum alapú hozzáférés-vezérelt szobákhoz. Az attribútumok határozzák meg a szoba hozzáférését."
"Your_workspace": "Az Ön munkaterülete"
}
9 changes: 5 additions & 4 deletions app/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"A11y_in_app_notification": "Nuovo messaggio da {{name}}: {{message}}",
"A11y_incoming_call_dismiss": "Ignora",
"A11y_incoming_call_swipe_down_to_view_options": "Scorri verso il basso per visualizzare le opzioni",
"ABAC_disabled_action_reason": "Non disponibile nelle stanze gestite da ABAC",
"ABAC_managed": "Gestito da ABAC",
"ABAC_managed_description": "Solo gli utenti conformi hanno accesso alle stanze controllate da accesso basato su attributi. Gli attributi determinano l'accesso alla stanza.",
"ABAC_room_attributes": "Attributi della stanza",
"Accessibility": "Accessibilità",
"Accessibility_and_Appearance": "Accessibilità e aspetto",
"Accessibility_statement": "Dichiarazione di accessibilità",
Expand Down Expand Up @@ -678,8 +682,5 @@
"Your_invite_link_will_never_expire": "Il tuo link di invito non scadrà mai.",
"Your_password_is": "La tua password è",
"Your_Password_Must_Have": "La tua password deve avere:",
"Your_workspace": "Il tuo workspace",
"ABAC_room_attributes": "Attributi della stanza",
"ABAC_managed": "Gestito da ABAC",
"ABAC_managed_description": "Solo gli utenti conformi hanno accesso alle stanze controllate da accesso basato su attributi. Gli attributi determinano l'accesso alla stanza."
"Your_workspace": "Il tuo workspace"
}
Loading
Loading