Commit b3ec1f12 authored by Fabio Stegmeyer's avatar Fabio Stegmeyer

[TASK] Introduce access check to visbility-flag table in FieldVisibilityFunction.php

parent b1221b33
......@@ -133,6 +133,14 @@ class FieldVisibilityUserFunction extends AbstractFormElement {
/** @var BackendUserAuthentication $backendUser */
$backendUser = $GLOBALS['BE_USER'];
if(!$GLOBALS['BE_USER']->check('tables_modify', 'tx_languagevisibility_visibility_flag')){
return ['html' =>
'<div class="alert alert-info">' .
$this->getLLL('backend.error.noAccessToVisibilityFlags') .
'</div>'
];
}
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '10.2.0', '<')) {
$this->modTSconfig = BackendUtility::getRawPagesTSconfig($pageId)['mod.']['languagevisibility.'];
} else {
......
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="">
<header>
<type>database</type>
<description>Language labels for database tables/fields belonging to extension 'languagevisibility'</description>
<generator>LFEditor</generator>
</header>
<body>
<trans-unit id="applyRecursive" approved="yes">
<source>Apply to all subpages</source>
<target>Für alle Unterseiten übernehmen</target>
</trans-unit>
<trans-unit id="default" approved="yes">
<source>-default-</source>
<target>-Standard-</target>
</trans-unit>
<trans-unit id="enableLogging" approved="yes">
<source>Enable logging of the changes for the recursive functionallity. (Slow for many pages)</source>
<target>Aktiviere das Loggen der Änderungen für die Rekursiv-Funktion. (Langsam für viele Seiten)</target>
</trans-unit>
<trans-unit id="fallback" approved="yes" xml:space="preserve">
<source>if a translation in fallback exists</source>
<target>Wenn eine Übersetzung im Fallback existiert</target>
</trans-unit>
<trans-unit id="hastranslation" approved="yes">
<source>Is translated</source>
<target>Übersetzt</target>
</trans-unit>
<trans-unit id="isshown" approved="yes">
<source>Is visible</source>
<target>Sichtbar</target>
</trans-unit>
<trans-unit id="language" approved="yes">
<source>Language</source>
<target>Sprache</target>
</trans-unit>
<trans-unit id="no" approved="yes">
<source>never</source>
<target>niemals</target>
</trans-unit>
<trans-unit id="pages.tx_languagevisibility_visibility" approved="yes">
<source>Language visibility:</source>
<target>Sprachsichtbarkeit:</target>
</trans-unit>
<trans-unit id="reports.fail.message" approved="yes">
<source>Unsupported values (other than &quot;ignore&quot;) used on:</source>
<target>Nicht unterstützte Werte (andere als &quot;ignore&quot;) benutzt in:</target>
</trans-unit>
<trans-unit id="reports.fail.message.detail" approved="yes">
<source>Page %1$d and its subpages - uses mode &quot;%3$s&quot; (sys_template:%2$d)</source>
<target>Seite %1$d und dessen Unterseiten - benutzter Modus &quot;%3$s&quot; (sys_template:%2$d)</target>
</trans-unit>
<trans-unit id="reports.fail.value" approved="yes">
<source>Unsupported value</source>
<target>Nicht unterstüzter Wert</target>
</trans-unit>
<trans-unit id="reports.ok.value" approved="yes">
<source>OK</source>
<target>OK</target>
</trans-unit>
<trans-unit id="tabname" approved="yes">
<source>Language</source>
<target>Sprache</target>
</trans-unit>
<trans-unit id="translated" approved="yes">
<source>if translated</source>
<target>wenn übersetzt</target>
</trans-unit>
<trans-unit id="tt_content.tx_languagevisibility_visibility" approved="yes">
<source>Language visibility:</source>
<target>Sprachsichtbarkeit:</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I." approved="yes">
<source>empty</source>
<target>leer</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.active" approved="yes">
<source>Active</source>
<target>Verfügbar</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.fallback" approved="yes">
<source>&#160;&#160;&#160;+ or in fallback</source>
<target>&#160;&#160;&#160;+ oder im Fallback</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.inactive" approved="yes">
<source>Inactive</source>
<target>Nicht verfügbar</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.translated" approved="yes">
<source>+ only if translated</source>
<target>+ nur falls übersetzt</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.enforce" approved="yes">
<source>+ enforce</source>
<target>+ erzwingen</target>
</trans-unit>
<trans-unit id="visibility" approved="yes">
<source>visibility setting</source>
<target>Sichtbarkeits-Einstellungen</target>
</trans-unit>
<trans-unit id="visibility_in_default" approved="yes">
<source>Default visibility</source>
<target>Standard-Sichtbarkeit</target>
</trans-unit>
<trans-unit id="visibility_in_overlay" approved="yes">
<source>Translation visibility</source>
<target>Sichtbarkeit der Übersetzung</target>
</trans-unit>
<trans-unit id="visibility_options" approved="yes">
<source>Visibility options</source>
<target>Sichtbarkeits-Optionen</target>
</trans-unit>
<trans-unit id="visibility_currently" approved="yes">
<source>Visibility </source>
<target>Sichtbarkeit aktuell</target>
</trans-unit>
<trans-unit id="yes" approved="yes">
<source>always</source>
<target>immer</target>
</trans-unit>
<trans-unit id="backend.error.settingsCorrupt">
<source>Visibility Settings seems to be corrupt</source>
<target>Die Sichtbarkeitseinstellungen sind korrupt</target>
</trans-unit>
<trans-unit id="backend.error.elementNotSupported">
<source>Localization of this element is not supported</source>
<target>Die Übersetzung dieses Elements wird nicht unterstützt</target>
</trans-unit>
<trans-unit id="backend.error.siteNotFound">
<source>The site of this element couldn't be determined</source>
<target>Die Seite dieses Elements wurde nicht gefunden</target>
</trans-unit>
<trans-unit id="backend.error.languageNotAvailable">
<source>The specified language is not available</source>
<target>Die Sprache des Elements ist nicht verfügbar</target>
</trans-unit>
<trans-unit id="backend.justEditableInTheDefault" approved="yes">
<source>This field can only be edited in the default language.</source>
<target>Dieses Feld kann nur in der Standardsprache bearbeitet werden.</target>
</trans-unit>
<trans-unit id="backend.configuredInParent">
<source>Parent configuration is set to:</source>
<target>Standardsprache ist konfiguriert mit:</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag">
<target>Vom Standard abweichende language-visibility-Einstellungen</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_table">
<target>Tabelle</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_uid">
<target>Uid</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_language_uid">
<target>Sprache</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_flag">
<target>Einstellung</target>
</trans-unit>
<trans-unit id="backend.error.noVisibilitySettingsAvailable" approved="yes">
<target><![CDATA[Keine Sichtbarkeits-Einstellungen verfügbar. Sie befinden sich entweder auf einer Root-Seite [pid = 0] oder einer noch nicht gespeicherten Seite.]]></target>
</trans-unit>
</body>
<header>
<type>database</type>
<description>Language labels for database tables/fields belonging to extension 'languagevisibility'</description>
<generator>LFEditor</generator>
</header>
<body>
<trans-unit id="applyRecursive" approved="yes">
<source>Apply to all subpages</source>
<target>Für alle Unterseiten übernehmen</target>
</trans-unit>
<trans-unit id="backend.configuredInParent" approved="yes">
<source>Parent configuration is set to:</source>
<target>Standardsprache ist konfiguriert mit:</target>
</trans-unit>
<trans-unit id="backend.error.elementNotSupported" approved="yes">
<source>Localization of this element is not supported</source>
<target>Die Übersetzung dieses Elements wird nicht unterstützt</target>
</trans-unit>
<trans-unit id="backend.error.languageNotAvailable" approved="yes">
<source>The specified language is not available</source>
<target>Die Sprache des Elements ist nicht verfügbar</target>
</trans-unit>
<trans-unit id="backend.error.noAccessToVisibilityFlags" approved="yes">
<source><![CDATA[Your user doesn't have access to the language visbility settings.]]></source>
<target><![CDATA[Ihr benutzer hat keinen Zugriff auf die Sprach-Sichtbarkeitseinstellungen.]]></target>
</trans-unit>
<trans-unit id="backend.error.noVisibilitySettingsAvailable" approved="yes">
<source></source>
<target><![CDATA[Keine Sichtbarkeits-Einstellungen verfügbar. Sie befinden sich entweder auf einer Root-Seite [pid = 0] oder einer noch nicht gespeicherten Seite.]]></target>
</trans-unit>
<trans-unit id="backend.error.settingsCorrupt" approved="yes">
<source>Visibility Settings seems to be corrupt</source>
<target>Die Sichtbarkeitseinstellungen sind korrupt</target>
</trans-unit>
<trans-unit id="backend.error.siteNotFound" approved="yes">
<source>The site of this element couldn't be determined</source>
<target>Die Seite dieses Elements wurde nicht gefunden</target>
</trans-unit>
<trans-unit id="backend.justEditableInTheDefault" approved="yes">
<source>This field can only be edited in the default language.</source>
<target>Dieses Feld kann nur in der Standardsprache bearbeitet werden.</target>
</trans-unit>
<trans-unit id="default" approved="yes">
<source>-default-</source>
<target>-Standard-</target>
</trans-unit>
<trans-unit id="enableLogging" approved="yes">
<source>Enable logging of the changes for the recursive functionallity. (Slow for many pages)</source>
<target>Aktiviere das Loggen der Änderungen für die Rekursiv-Funktion. (Langsam für viele Seiten)</target>
</trans-unit>
<trans-unit id="fallback" approved="yes">
<source>if a translation in fallback exists</source>
<target>Wenn eine Übersetzung im Fallback existiert</target>
</trans-unit>
<trans-unit id="hastranslation" approved="yes">
<source>Is translated</source>
<target>Übersetzt</target>
</trans-unit>
<trans-unit id="isshown" approved="yes">
<source>Is visible</source>
<target>Sichtbar</target>
</trans-unit>
<trans-unit id="language" approved="yes">
<source>Language</source>
<target>Sprache</target>
</trans-unit>
<trans-unit id="no" approved="yes">
<source>never</source>
<target>niemals</target>
</trans-unit>
<trans-unit id="pages.tx_languagevisibility_visibility" approved="yes">
<source>Language visibility:</source>
<target>Sprachsichtbarkeit:</target>
</trans-unit>
<trans-unit id="reports.fail.message" approved="yes">
<source>Unsupported values (other than &quot;ignore&quot;) used on:</source>
<target>Nicht unterstützte Werte (andere als &quot;ignore&quot;) benutzt in:</target>
</trans-unit>
<trans-unit id="reports.fail.message.detail" approved="yes">
<source>Page %1$d and its subpages - uses mode &quot;%3$s&quot; (sys_template:%2$d)</source>
<target>Seite %1$d und dessen Unterseiten - benutzter Modus &quot;%3$s&quot; (sys_template:%2$d)</target>
</trans-unit>
<trans-unit id="reports.fail.value" approved="yes">
<source>Unsupported value</source>
<target>Nicht unterstüzter Wert</target>
</trans-unit>
<trans-unit id="reports.ok.value" approved="yes">
<source>OK</source>
<target>OK</target>
</trans-unit>
<trans-unit id="tabname" approved="yes">
<source>Language</source>
<target>Sprache</target>
</trans-unit>
<trans-unit id="translated" approved="yes">
<source>if translated</source>
<target>wenn übersetzt</target>
</trans-unit>
<trans-unit id="tt_content.tx_languagevisibility_visibility" approved="yes">
<source>Language visibility:</source>
<target>Sprachsichtbarkeit:</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I." approved="yes">
<source>empty</source>
<target>leer</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.active" approved="yes">
<source>Active</source>
<target>Verfügbar</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.enforce" approved="yes">
<source>+ enforce</source>
<target>+ erzwingen</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.fallback" approved="yes">
<source>&#160;&#160;&#160;+ or in fallback</source>
<target>&#160;&#160;&#160;+ oder im Fallback</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.inactive" approved="yes">
<source>Inactive</source>
<target>Nicht verfügbar</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.translated" approved="yes">
<source>+ only if translated</source>
<target>+ nur falls übersetzt</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag" approved="yes">
<source></source>
<target>Vom Standard abweichende language-visibility-Einstellungen</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_flag" approved="yes">
<source></source>
<target>Einstellung</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_language_uid" approved="yes">
<source></source>
<target>Sprache</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_table" approved="yes">
<source></source>
<target>Tabelle</target>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_uid" approved="yes">
<source></source>
<target>Uid</target>
</trans-unit>
<trans-unit id="visibility" approved="yes">
<source>visibility setting</source>
<target>Sichtbarkeits-Einstellungen</target>
</trans-unit>
<trans-unit id="visibility_currently" approved="yes">
<source>Visibility</source>
<target>Sichtbarkeit aktuell</target>
</trans-unit>
<trans-unit id="visibility_in_default" approved="yes">
<source>Default visibility</source>
<target>Standard-Sichtbarkeit</target>
</trans-unit>
<trans-unit id="visibility_in_overlay" approved="yes">
<source>Translation visibility</source>
<target>Sichtbarkeit der Übersetzung</target>
</trans-unit>
<trans-unit id="visibility_options" approved="yes">
<source>Visibility options</source>
<target>Sichtbarkeits-Optionen</target>
</trans-unit>
<trans-unit id="yes" approved="yes">
<source>always</source>
<target>immer</target>
</trans-unit>
</body>
</file>
</xliff>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="">
<header>
<type>database</type>
<description>Language labels for database tables/fields belonging to extension 'languagevisibility'</description>
<generator>LFEditor</generator>
</header>
<body>
<trans-unit id="applyRecursive">
<source>Apply to all subpages</source>
</trans-unit>
<trans-unit id="default">
<source>-default-</source>
</trans-unit>
<trans-unit id="enableLogging">
<source>Enable logging of the changes for the recursive functionallity. (Slow for many pages)</source>
</trans-unit>
<trans-unit id="fallback">
<source>if a translation in fallback exists</source>
</trans-unit>
<trans-unit id="hastranslation">
<source>Is translated</source>
</trans-unit>
<trans-unit id="isshown">
<source>Is visible</source>
</trans-unit>
<trans-unit id="language">
<source>Language</source>
</trans-unit>
<trans-unit id="no">
<source>never</source>
</trans-unit>
<trans-unit id="pages.tx_languagevisibility_visibility">
<source>Language visibility:</source>
</trans-unit>
<trans-unit id="reports.fail.message">
<source>Unsupported values (other than &quot;ignore&quot;) used on:</source>
</trans-unit>
<trans-unit id="reports.fail.message.detail">
<source>Page %1$d and its subpages - uses mode &quot;%3$s&quot; (sys_template:%2$d)</source>
</trans-unit>
<trans-unit id="reports.fail.value">
<source>Unsupported value</source>
</trans-unit>
<trans-unit id="reports.ok.value">
<source>OK</source>
</trans-unit>
<trans-unit id="tabname">
<source>Language</source>
</trans-unit>
<trans-unit id="translated">
<source>if translated</source>
</trans-unit>
<trans-unit id="tt_content.tx_languagevisibility_visibility">
<source>Language visibility:</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.">
<source>empty</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.active">
<source>Active</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.fallback">
<source>&#160;&#160;&#160;+ or in fallback</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.inactive">
<source>Inactive</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.translated">
<source>+ only if translated</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.enforce">
<source>+ enforce</source>
</trans-unit>
<trans-unit id="visibility">
<source>visibility setting</source>
</trans-unit>
<trans-unit id="visibility_in_default">
<source>Default visibility</source>
</trans-unit>
<trans-unit id="visibility_in_overlay">
<source>Translation visibility</source>
</trans-unit>
<trans-unit id="visibility_options" approved="yes">
<source>Visibility options</source>
</trans-unit>
<trans-unit id="visibility_currently" approved="yes">
<source>Current visibility</source>
</trans-unit>
<trans-unit id="yes">
<source>always</source>
</trans-unit>
<trans-unit id="backend.error.settingsCorrupt">
<source>Visibility Settings seems to be corrupt</source>
</trans-unit>
<trans-unit id="backend.error.elementNotSupported">
<source>Localization of this element is not supported</source>
</trans-unit>
<trans-unit id="backend.error.siteNotFound">
<source>The site of this elements couldn't be determined</source>
</trans-unit>
<trans-unit id="backend.error.languageNotAvailable">
<source>The specified language is not available</source>
</trans-unit>
<trans-unit id="backend.justEditableInTheDefault">
<source>This field can only be edited in the default language.</source>
</trans-unit>
<trans-unit id="backend.configuredInParent">
<source>Parent configuration is set to: </source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag">
<source>Non-default language-visibility flags</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_table">
<source>Table</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_uid">
<source>Uid</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_language_uid">
<source>Language</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_flag">
<source>Flag</source>
</trans-unit>
<trans-unit id="backend.error.noVisibilitySettingsAvailable">
<source><![CDATA[No visibility-settings available. Your are either on a root-page [pid = 0] or an not yet saved page.]]></source>
</trans-unit>
</body>
<header>
<type>database</type>
<description>Language labels for database tables/fields belonging to extension 'languagevisibility'</description>
<generator>LFEditor</generator>
</header>
<body>
<trans-unit id="applyRecursive">
<source>Apply to all subpages</source>
</trans-unit>
<trans-unit id="backend.configuredInParent">
<source>Parent configuration is set to:</source>
</trans-unit>
<trans-unit id="backend.error.elementNotSupported">
<source>Localization of this element is not supported</source>
</trans-unit>
<trans-unit id="backend.error.languageNotAvailable">
<source>The specified language is not available</source>
</trans-unit>
<trans-unit id="backend.error.noAccessToVisibilityFlags">
<source><![CDATA[Your user doesn't have access to the language visbility settings.]]></source>
</trans-unit>
<trans-unit id="backend.error.noVisibilitySettingsAvailable">
<source><![CDATA[No visibility-settings available. Your are either on a root-page [pid = 0] or an not yet saved page.]]></source>
</trans-unit>
<trans-unit id="backend.error.settingsCorrupt">
<source>Visibility Settings seems to be corrupt</source>
</trans-unit>
<trans-unit id="backend.error.siteNotFound">
<source>The site of this elements couldn't be determined</source>
</trans-unit>
<trans-unit id="backend.justEditableInTheDefault">
<source>This field can only be edited in the default language.</source>
</trans-unit>
<trans-unit id="default">
<source>-default-</source>
</trans-unit>
<trans-unit id="enableLogging">
<source>Enable logging of the changes for the recursive functionallity. (Slow for many pages)</source>
</trans-unit>
<trans-unit id="fallback">
<source>if a translation in fallback exists</source>
</trans-unit>
<trans-unit id="hastranslation">
<source>Is translated</source>
</trans-unit>
<trans-unit id="isshown">
<source>Is visible</source>
</trans-unit>
<trans-unit id="language">
<source>Language</source>
</trans-unit>
<trans-unit id="no">
<source>never</source>
</trans-unit>
<trans-unit id="pages.tx_languagevisibility_visibility">
<source>Language visibility:</source>
</trans-unit>
<trans-unit id="reports.fail.message">
<source>Unsupported values (other than &quot;ignore&quot;) used on:</source>
</trans-unit>
<trans-unit id="reports.fail.message.detail">
<source>Page %1$d and its subpages - uses mode &quot;%3$s&quot; (sys_template:%2$d)</source>
</trans-unit>
<trans-unit id="reports.fail.value">
<source>Unsupported value</source>
</trans-unit>
<trans-unit id="reports.ok.value">
<source>OK</source>
</trans-unit>
<trans-unit id="tabname">
<source>Language</source>
</trans-unit>
<trans-unit id="translated">
<source>if translated</source>
</trans-unit>
<trans-unit id="tt_content.tx_languagevisibility_visibility">
<source>Language visibility:</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.">
<source>empty</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.active">
<source>Active</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.enforce">
<source>+ enforce</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.fallback">
<source>&#160;&#160;&#160;+ or in fallback</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.inactive">
<source>Inactive</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility.I.translated">
<source>+ only if translated</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag">
<source>Non-default language-visibility flags</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_flag">
<source>Flag</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_language_uid">
<source>Language</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_table">
<source>Table</source>
</trans-unit>
<trans-unit id="tx_languagevisibility_visibility_flag.record_uid">
<source>Uid</source>
</trans-unit>
<trans-unit id="visibility">
<source>visibility setting</source>
</trans-unit>
<trans-unit id="visibility_currently">
<source>Current visibility</source>
</trans-unit>
<trans-unit id="visibility_in_default">
<source>Default visibility</source>
</trans-unit>
<trans-unit id="visibility_in_overlay">
<source>Translation visibility</source>
</trans-unit>
<trans-unit id="visibility_options">
<source>Visibility options</source>
</trans-unit>
<trans-unit id="yes">
<source>always</source>
</trans-unit>
</body>
</file>
</xliff>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment