Project

General

Profile

Bug #21795 ยป fullLangAccessCheckTooRestrictive.patch

Administrator Admin, 2009-12-04 15:51

View differences:

t3lib/class.t3lib_tcemain.php (working copy)
// Now, the $uid is the actual record we will copy while $origUid is the record we asked to get copied - but that could be a live version.
*/
if ($this->doesRecordExist($table,$uid,'show')) { // This checks if the record can be selected which is all that a copy action requires.
if ($this->BE_USER->recordEditAccessInternals($table,$uid, false, false, true)) { //Used to check language and general editing rights
if (($language > 0 && $this->BE_USER->checkLanguageAccess($language) ) || $this->BE_USER->recordEditAccessInternals($table, $uid, false, false, true)) { //Used to check language and general editing rights
$data = Array();
$nonFields = array_unique(t3lib_div::trimExplode(',','uid,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,t3ver_oid,t3ver_wsid,t3ver_id,t3ver_label,t3ver_state,t3ver_swapmode,t3ver_count,t3ver_stage,t3ver_tstamp,'.$excludeFields,1));
t3lib/class.t3lib_userauthgroup.php (working copy)
if (!$this->checkLanguageAccess($idOrRow[$TCA[$table]['ctrl']['languageField']])) {
$this->errorMsg = 'ERROR: Language was not allowed.';
return FALSE;
} elseif ($checkFullLanguageAccess && !$this->checkFullLanguagesAccess($table, $idOrRow)) {
} elseif ($checkFullLanguageAccess && $idOrRow[$TCA[$table]['ctrl']['languageField']]==0 && !$this->checkFullLanguagesAccess($table, $idOrRow)) {
$this->errorMsg = 'ERROR: Related/affected language was not allowed.';
return FALSE;
}
    (1-1/1)