TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Authentication\BackendUserAuthentication Class Reference
Inheritance diagram for TYPO3\CMS\Core\Authentication\BackendUserAuthentication:
TYPO3\CMS\Core\Authentication\AbstractUserAuthentication t3lib_beUserAuth TYPO3\CMS\Backend\FrontendBackendUserAuthentication t3lib_tsfeBeUserAuth

Public Member Functions

 __construct ()
 
 isAdmin ()
 
 isMemberOfGroup ($groupId)
 
 doesUserHaveAccess ($row, $perms)
 
 isInWebMount ($id, $readPerms='', $exitOnError=0)
 
 modAccess ($conf, $exitOnError)
 
 getPagePermsClause ($perms)
 
 calcPerms ($row)
 
 isRTE ()
 
 check ($type, $value)
 
 checkAuthMode ($table, $field, $value, $authMode)
 
 checkLanguageAccess ($langValue)
 
 checkFullLanguagesAccess ($table, $record)
 
 recordEditAccessInternals ($table, $idOrRow, $newRecord=FALSE, $deletedRecord=FALSE, $checkFullLanguageAccess=FALSE)
 
 isPSet ($compiledPermissions, $tableName, $actionType='')
 
 mayMakeShortcut ()
 
 workspaceCannotEditRecord ($table, $recData)
 
 workspaceCannotEditOfflineVersion ($table, $recData)
 
 workspaceAllowLiveRecordsInPID ($pid, $table)
 
 workspaceCreateNewRecord ($pid, $table)
 
 workspaceAllowAutoCreation ($table, $id, $recpid)
 
 workspaceCheckStageForCurrent ($stage)
 
 workspacePublishAccess ($wsid)
 
 workspaceSwapAccess ()
 
 getTSConfig ($objectString, $config='')
 
 getTSConfigVal ($objectString)
 
 getTSConfigProp ($objectString)
 
 returnWebmounts ()
 
 jsConfirmation ($bitmask)
 
 fetchGroupData ()
 
 fetchGroups ($grList, $idList='')
 
 setCachedList ($cList)
 
 getCategoryMountPoints ()
 
 getFileMountRecords ()
 
 getFileStorages ()
 
 evaluateUserSpecificFileFilterSettings ()
 
 getFilePermissions ()
 
 getFilePermissionsForStorage (\TYPO3\CMS\Core\Resource\ResourceStorage $storageObject)
 
 getDefaultUploadTemporaryFolder ()
 
 addTScomment ($str)
 
 workspaceInit ()
 
 checkWorkspace ($wsRec, $fields='uid, title, adminusers, members, reviewers, publish_access, stagechg_notification')
 
 checkWorkspaceCurrent ()
 
 setWorkspace ($workspaceId)
 
 setTemporaryWorkspace ($workspaceId)
 
 setDefaultWorkspace ()
 
 setWorkspacePreview ($previewState)
 
 getDefaultWorkspace ()
 
 writelog ($type, $action, $error, $details_nr, $details, $data, $tablename='', $recuid='', $recpid='', $event_pid=-1, $NEWid='', $userId=0)
 
 simplelog ($message, $extKey='', $error=0)
 
 checkLockToIP ()
 
 backendCheckLogin ()
 
 checkCLIuser ()
 
 backendSetUC ()
 
 overrideUC ()
 
 resetUC ()
 
 logoff ()
 
- Public Member Functions inherited from TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 __construct ()
 
 start ()
 
 isSetSessionCookie ()
 
 isRefreshTimeBasedCookie ()
 
 checkAuthentication ()
 
 createSessionId ()
 
 createUserSession ($tempuser)
 
 getNewSessionRecord ($tempuser)
 
 fetchUserSession ($skipSessionUpdate=FALSE)
 
 logoff ()
 
 removeCookie ($cookieName)
 
 isExistingSessionRecord ($id)
 
 isCookieSet ()
 
 veriCode ()
 
 writeUC ($variable='')
 
 unpack_uc ($theUC='')
 
 pushModuleData ($module, $data, $noSave=0)
 
 getModuleData ($module, $type='')
 
 getSessionData ($key)
 
 setAndSaveSessionData ($key, $data)
 
 getLoginFormData ()
 
 processLoginData ($loginData, $passwordTransmissionStrategy='')
 
 getAuthInfoArray ()
 
 compareUident ($user, $loginData, $passwordCompareStrategy='')
 
 gc ()
 
 writelog ($type, $action, $error, $details_nr, $details, $data, $tablename, $recuid, $recpid)
 
 checkLogFailures ($email, $secondsBack, $maxFailures)
 
 setBeUserByUid ($uid)
 
 setBeUserByName ($name)
 
 getRawUserByUid ($uid)
 
 getRawUserByName ($name)
 
 fetchUserRecord ($dbUser, $username, $extraWhere='')
 

Static Public Member Functions

static getCookieName ()
 

Public Attributes

 $usergroup_column = 'usergroup'
 
 $usergroup_table = 'be_groups'
 
 $groupData
 
 $userGroups = array()
 
 $userGroupsUID = array()
 
 $groupList = ''
 
 $workspace = -99
 
 $workspaceRec = array()
 
 $dataLists
 
 $includeHierarchy = array()
 
 $includeGroupArray = array()
 
 $OS = ''
 
 $TSdataArray = array()
 
 $userTS_text = ''
 
 $userTS = array()
 
 $userTSUpdated = FALSE
 
 $userTS_dontGetCached = FALSE
 
 $RTE_errors = array()
 
 $errorMsg = ''
 
 $checkWorkspaceCurrent_cache = NULL
 
 $session_table = 'be_sessions'
 
 $user_table = 'be_users'
 
 $username_column = 'username'
 
 $userident_column = 'password'
 
 $userid_column = 'uid'
 
 $lastLogin_column = 'lastlogin'
 
 $enablecolumns
 
 $formfield_uname = 'username'
 
 $formfield_uident = 'userident'
 
 $formfield_chalvalue = 'challenge'
 
 $formfield_status = 'login_status'
 
 $writeStdLog = TRUE
 
 $writeAttemptLog = TRUE
 
 $auth_timeout_field = 6000
 
 $challengeStoredInCookie = TRUE
 
 $firstMainGroup = 0
 
 $uc
 
 $uc_default
 
- Public Attributes inherited from TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 $global_database = ''
 
 $session_table = ''
 
 $name = ''
 
 $get_name = ''
 
 $user_table = ''
 
 $usergroup_table = ''
 
 $username_column = ''
 
 $userident_column = ''
 
 $userid_column = ''
 
 $usergroup_column = ''
 
 $lastLogin_column = ''
 
 $enablecolumns
 
 $showHiddenRecords = FALSE
 
 $formfield_uname = ''
 
 $formfield_uident = ''
 
 $formfield_chalvalue = ''
 
 $formfield_status = ''
 
 $auth_timeout_field = 0
 
 $lifetime = 0
 
 $gc_time = 0
 
 $gc_probability = 1
 
 $writeStdLog = FALSE
 
 $writeAttemptLog = FALSE
 
 $sendNoCacheHeaders = TRUE
 
 $getFallBack = FALSE
 
 $hash_length = 32
 
 $getMethodEnabled = FALSE
 
 $lockIP = 4
 
 $lockHashKeyWords = 'useragent'
 
 $warningEmail = ''
 
 $warningPeriod = 3600
 
 $warningMax = 3
 
 $checkPid = TRUE
 
 $checkPid_value = 0
 
 $id
 
 $cookieId
 
 $loginFailure = FALSE
 
 $loginSessionStarted = FALSE
 
 $user = NULL
 
 $get_URL_ID = ''
 
 $newSessionID = FALSE
 
 $forceSetCookie = FALSE
 
 $dontSetCookie = FALSE
 
 $challengeStoredInCookie = FALSE
 
 $loginType = ''
 
 $svConfig = array()
 
 $writeDevLog = FALSE
 
 $uc
 

Protected Member Functions

 initializeDbMountpointsInWorkspace ()
 
 isUserAllowedToLogin ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 setSessionCookie ()
 
 getCookieDomain ()
 
 getCookie ($cookieName)
 
 regenerateSessionId ()
 
 fetchUserSessionFromDB ()
 
 user_where_clause ()
 
 ipLockClause ()
 
 ipLockClause_remoteIPNumber ($parts)
 
 hashLockClause ()
 
 hashLockClause_getHashInt ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $fileStorages
 
 $filePermissions
 
- Protected Attributes inherited from TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 $cookieWasSetOnCurrentRequest = FALSE
 
 $db = NULL
 

Detailed Description

TYPO3 backend user authentication Contains most of the functions used for checking permissions, authenticating users, setting up the user, and API for user from outside. This class contains the configuration of the database fields used plus some functions for the authentication process of backend users.

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 31 of file BackendUserAuthentication.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::__construct ( )

Constructor

Definition at line 364 of file BackendUserAuthentication.php.

Member Function Documentation

◆ addTScomment()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::addTScomment (   $str)

Creates a TypoScript comment with the string text inside.

Parameters
string$strThe text to wrap in comment prefixes and delimiters.
Returns
string TypoScript comment with the string text inside.
Todo:
Define visibility

Definition at line 1960 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroups().

◆ backendCheckLogin()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::backendCheckLogin ( )

Check if user is logged in and if so, call ->fetchGroupData() to load group information and access lists of all kind, further check IP, set the ->uc array and send login-notification email if required. If no user is logged in the default behaviour is to exit with an error message, but this will happen ONLY if the constant TYPO3_PROCEED_IF_NO_USER is set TRUE. This function is called right after ->start() in fx. init.php

Exceptions

Definition at line 2356 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\backendSetUC(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkLockToIP(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isUserAllowedToLogin(), TYPO3\CMS\Core\Utility\HttpUtility\redirect(), and TYPO3_PROCEED_IF_NO_USER.

◆ backendSetUC()

◆ calcPerms()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::calcPerms (   $row)

Returns a combined binary representation of the current users permissions for the page-record, $row. The perms for user, group and everybody is OR'ed together (provided that the page-owner is the user and for the groups that the user is a member of the group. If the user is admin, 31 is returned (full permissions for all five flags)

Parameters
array$rowInput page row with all perms_* fields available.
Returns
integer Bitwise representation of the users permissions in relation to input page row, $row
Todo:
Define visibility

Definition at line 566 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isInWebMount(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isMemberOfGroup().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\doesUserHaveAccess().

◆ check()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::check (   $type,
  $value 
)

Returns TRUE if the $value is found in the list in a $this->groupData[] index pointed to by $type (array key). Can thus be users to check for modules, exclude-fields, select/modify permissions for tables etc. If user is admin TRUE is also returned Please see the document Inside TYPO3 for examples.

Parameters
string$typeThe type value; "webmounts", "filemounts", "pagetypes_select", "tables_select", "tables_modify", "non_exclude_fields", "modules
string$valueString to search for in the groupData-list
Returns
boolean TRUE if permission is granted (that is, the value was found in the groupData list - or the BE_USER is "admin")
Todo:
Define visibility

Definition at line 644 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkLanguageAccess(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\modAccess().

◆ checkAuthMode()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkAuthMode (   $table,
  $field,
  $value,
  $authMode 
)

Checking the authMode of a select field with authMode set

Parameters
string$tableTable name
string$fieldField name (must be configured in TCA and of type "select" with authMode set!)
string$valueValue to evaluation (single value, must not contain any of the chars ":,|")
string$authModeAuth mode keyword (explicitAllow, explicitDeny, individual)
Returns
boolean Whether access is granted or not
Todo:
Define visibility

Definition at line 663 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\recordEditAccessInternals().

◆ checkCLIuser()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkCLIuser ( )

If the backend script is in CLI mode, it will try to load a backend user named by the CLI module name (in lowercase)

Returns
boolean Returns TRUE if a CLI user was loaded, otherwise FALSE!
Todo:
Define visibility

Definition at line 2387 of file BackendUserAuthentication.php.

References $GLOBALS, die, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), and TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\setBeUserByName().

◆ checkFullLanguagesAccess()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkFullLanguagesAccess (   $table,
  $record 
)

Check if user has access to all existing localizations for a certain record

Parameters
string$tableThe table
array$recordThe current record
Returns
boolean
Todo:
Define visibility

Definition at line 746 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkLanguageAccess(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordsByField(), and TYPO3\CMS\Backend\Utility\BackendUtility\isTableLocalizable().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\recordEditAccessInternals().

◆ checkLanguageAccess()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkLanguageAccess (   $langValue)

Checking if a language value (-1, 0 and >0 for sys_language records) is allowed to be edited by the user.

Parameters
integer$langValueLanguage value to evaluate
Returns
boolean Returns TRUE if the language value is allowed, otherwise FALSE.
Todo:
Define visibility

Definition at line 726 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\check().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkFullLanguagesAccess(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\recordEditAccessInternals().

◆ checkLockToIP()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkLockToIP ( )

If TYPO3_CONF_VARS['BE']['enabledBeUserIPLock'] is enabled and an IP-list is found in the User TSconfig objString "options.lockToIP", then make an IP comparison with REMOTE_ADDR and return the outcome (TRUE/FALSE)

Returns
boolean TRUE, if IP address validates OK (or no check is done at all)
Todo:
Define visibility

Definition at line 2333 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\cmpIP(), TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfigVal().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\backendCheckLogin().

◆ checkWorkspace()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkWorkspace (   $wsRec,
  $fields = 'uid,
title  ,
adminusers  ,
members  ,
reviewers  ,
publish_access  ,
stagechg_notification'   
)

Checking if a workspace is allowed for backend user

Parameters
mixed$wsRecIf integer, workspace record is looked up, if array it is seen as a Workspace record with at least uid, title, members and adminusers columns. Can be faked for workspaces uid 0 and -1 (online and offline)
string$fieldsList of fields to select. Default fields are: uid,title,adminusers,members,reviewers,publish_access,stagechg_notification
Returns
array Output will also show how access was granted. Admin users will have a true output regardless of input.
Todo:
Define visibility

Definition at line 2027 of file BackendUserAuthentication.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause(), TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspaceCurrent(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getDefaultWorkspace(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\setDefaultWorkspace(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\setTemporaryWorkspace(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspacePublishAccess().

◆ checkWorkspaceCurrent()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkWorkspaceCurrent ( )

Uses checkWorkspace() to check if current workspace is available for user. This function caches the result and so can be called many times with no performance loss.

Returns
array See checkWorkspace()
See also
checkWorkspace()
Todo:
Define visibility

Definition at line 2102 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\$checkWorkspaceCurrent_cache, and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspace().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCheckStageForCurrent().

◆ doesUserHaveAccess()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::doesUserHaveAccess (   $row,
  $perms 
)

Checks if the permissions is granted based on a page-record ($row) and $perms (binary and'ed)

Bits for permissions, see $perms variable:

1 - Show: See/Copy page and the pagecontent. 16- Edit pagecontent: Change/Add/Delete/Move pagecontent. 2- Edit page: Change/Move the page, eg. change title, startdate, hidden. 4- Delete page: Delete the page and pagecontent. 8- New pages: Create new pages under the page.

Parameters
array$rowIs the pagerow for which the permissions is checked
integer$permsIs the binary representation of the permission we are going to check. Every bit in this number represents a permission that must be set. See function explanation.
Returns
boolean
Todo:
Define visibility

Definition at line 414 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\calcPerms().

Referenced by TYPO3\CMS\Backend\FrontendBackendUserAuthentication\extPageReadAccess().

◆ evaluateUserSpecificFileFilterSettings()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::evaluateUserSpecificFileFilterSettings ( )

Adds filters based on what the user has set this should be done in this place, and called whenever needed, but only when needed

Returns
void

Definition at line 1750 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Resource\Filter\FileNameFilter\setShowHiddenFilesAndFolders().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\setCachedList().

◆ fetchGroupData()

◆ fetchGroups()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::fetchGroups (   $grList,
  $idList = '' 
)

Fetches the group records, subgroups and fills internal arrays. Function is called recursively to fetch subgroups

Parameters
string$grListCommalist of be_groups uid numbers
string$idListList of already processed be_groups-uids so the function will not fall into a eternal recursion.
Returns
void private
Todo:
Define visibility

Definition at line 1446 of file BackendUserAuthentication.php.

References $GLOBALS, $uid, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\addTScomment(), TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction(), TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), TYPO3\CMS\Core\Utility\GeneralUtility\getUserObj(), TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData().

◆ getCategoryMountPoints()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getCategoryMountPoints ( )

Returns an array of category mount points. The category permissions from BE Groups are also taken into consideration and are merged into User permissions.

Returns
array

Definition at line 1576 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getCookieName()

static TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getCookieName ( )
static

Getter for the cookie name

Returns
string returns the configured cookie name

Definition at line 2317 of file BackendUserAuthentication.php.

References $configuredCookieName, and $GLOBALS.

◆ getDefaultUploadTemporaryFolder()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getDefaultUploadTemporaryFolder ( )

Returns a object that could be used for uploading temporary files in user context. The folder temp below the default upload folder of the user is used.

Returns
NULL|
See also
::getDefaultUploadFolder();

Definition at line 1934 of file BackendUserAuthentication.php.

◆ getDefaultWorkspace()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getDefaultWorkspace ( )

Return default workspace ID for user, If EXT:workspaces is not installed the user will be pushed the the Live workspace

Returns
integer Default workspace id. If no workspace is available it will be "-99
Todo:
Define visibility

Definition at line 2180 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspace(), and TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\setDefaultWorkspace().

◆ getFileMountRecords()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getFileMountRecords ( )

◆ getFilePermissions()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getFilePermissions ( )

Returns the information about file permissions. Previously, this was stored in the DB field fileoper_perms now it is file_permissions. Besides it can be handled via userTSconfig

permissions.file.default { addFile = 1 readFile = 1 writeFile = 1 copyFile = 1 moveFile = 1 renameFile = 1 unzipFile = 1 deleteFile = 1

addFolder = 1 readFolder = 1 writeFolder = 1 copyFolder = 1 moveFolder = 1 renameFolder = 1 deleteFolder = 1 recursivedeleteFolder = 1 }

overwrite settings for a specific storageObject

permissions.file.storage.StorageUid { readFile = 1 recursivedeleteFolder = 0 }

Please note that these permissions only apply, if the storage has the capabilities (browseable, writable), and if the driver allows for writing etc

Returns
array

Definition at line 1794 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\$filePermissions, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfigProp(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFilePermissionsForStorage().

◆ getFilePermissionsForStorage()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getFilePermissionsForStorage ( \TYPO3\CMS\Core\Resource\ResourceStorage  $storageObject)

Gets the file permissions for a storage by merging any storage-specific permissions for a storage with the default settings. Admin users will always get the default settings.

Parameters
\TYPO3\CMS\Core\Resource\ResourceStorage$storageObject
Returns
array

Definition at line 1853 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFilePermissions(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFileStorages(), TYPO3\CMS\Core\Resource\ResourceFactory\getInstance(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfigProp(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfigVal(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

◆ getFileStorages()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getFileStorages ( )

Returns an array with the filemounts for the user. Each filemount is represented with an array of a "name", "path" and "type". If no filemounts an empty array is returned.

Returns
[]

Definition at line 1735 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\$fileStorages.

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFilePermissionsForStorage().

◆ getPagePermsClause()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getPagePermsClause (   $perms)

Returns a WHERE-clause for the pages-table where user permissions according to input argument, $perms, is validated. $perms is the "mask" used to select. Fx. if $perms is 1 then you'll get all pages that a user can actually see! 2^0 = show (1) 2^1 = edit (2) 2^2 = delete (4) 2^3 = new (8) If the user is 'admin' " 1=1" is returned (no effect) If the user is not set at all (->user is not an array), then " 1=0" is returned (will cause no selection results at all) The 95% use of this function is "->getPagePermsClause(1)" which will return WHERE clauses for selecting pages in backend listings - in other words this will check read permissions.

Parameters
integer$permsPermission mask to use, see function description
Returns
string Part of where clause. Prefix " AND " to this.
Todo:
Define visibility

Definition at line 525 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isInWebMount().

◆ getTSConfig()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getTSConfig (   $objectString,
  $config = '' 
)

Returns the value/properties of a TS-object as given by $objectString, eg. 'options.dontMountAdminMounts' Nice (general!) function for returning a part of a TypoScript array!

Parameters
string$objectStringPointer to an "object" in the TypoScript array, fx. 'options.dontMountAdminMounts'
array | string$configOptional TSconfig array: If array, then this is used and not $this->userTS. If not array, $this->userTS is used.
Returns
array An array with two keys, "value" and "properties" where "value" is a string with the value of the object string and "properties" is an array with the properties of the object string.
Todo:
Define visibility

Definition at line 1219 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\$userTS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfigProp(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfigVal(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\jsConfirmation().

◆ getTSConfigProp()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getTSConfigProp (   $objectString)

Returns the "properties" of the $objectString from the BE_USERS "User TSconfig" array

Parameters
string$objectStringObject string, eg. "somestring.someproperty.somesubproperty
Returns
array The properties for that object string (object path) - if any
See also
getTSConfig()
Todo:
Define visibility

Definition at line 1262 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfig().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\backendSetUC(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFilePermissions(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFilePermissionsForStorage(), TYPO3\CMS\Backend\FrontendBackendUserAuthentication\initializeAdminPanel(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\overrideUC().

◆ getTSConfigVal()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getTSConfigVal (   $objectString)

◆ initializeDbMountpointsInWorkspace()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::initializeDbMountpointsInWorkspace ( )
protected

◆ isAdmin()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::isAdmin ( )

Returns TRUE if user is admin Basically this function evaluates if the ->user[admin] field has bit 0 set. If so, user is admin.

Returns
boolean
Todo:
Define visibility

Definition at line 377 of file BackendUserAuthentication.php.

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\calcPerms(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\check(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkAuthMode(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkCLIuser(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspace(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFilePermissions(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFilePermissionsForStorage(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getPagePermsClause(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isInWebMount(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isPSet(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isUserAllowedToLogin(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\modAccess(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\recordEditAccessInternals(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\resetUC(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\setCachedList(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCheckStageForCurrent(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspacePublishAccess().

◆ isInWebMount()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::isInWebMount (   $id,
  $readPerms = '',
  $exitOnError = 0 
)

Checks if the page id, $id, is found within the webmounts set up for the user. This should ALWAYS be checked for any page id a user works with, whether it's about reading, writing or whatever. The point is that this will add the security that a user can NEVER touch parts outside his mounted pages in the page tree. This is otherwise possible if the raw page permissions allows for it. So this security check just makes it easier to make safe user configurations. If the user is admin OR if this feature is disabled (fx. by setting TYPO3_CONF_VARS['BE']['lockBeUserToDBmounts']=0) then it returns "1" right away Otherwise the function will return the uid of the webmount which was first found in the rootline of the input page $id

Parameters
integer$idPage ID to check
string$readPermsContent of "->getPagePermsClause(1)" (read-permissions). If not set, they will be internally calculated (but if you have the correct value right away you can save that database lookup!)
bool | int$exitOnErrorIf set, then the function will exit with an error message.
Exceptions

Definition at line 436 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$id, TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getPagePermsClause(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\returnWebmounts().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\calcPerms(), TYPO3\CMS\Backend\FrontendBackendUserAuthentication\extPageReadAccess(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\initializeDbMountpointsInWorkspace().

◆ isMemberOfGroup()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::isMemberOfGroup (   $groupId)

Returns TRUE if the current user is a member of group $groupId $groupId must be set. $this->groupList must contain groups Will return TRUE also if the user is a member of a group through subgroups.

Parameters
integer$groupIdGroup ID to look for in $this->groupList
Returns
boolean
Todo:
Define visibility

Definition at line 390 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\inList().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\calcPerms().

◆ isPSet()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::isPSet (   $compiledPermissions,
  $tableName,
  $actionType = '' 
)

Checks a type of permission against the compiled permission integer, $compiledPermissions, and in relation to table, $tableName

Parameters
integer$compiledPermissionsCould typically be the "compiled permissions" integer returned by ->calcPerms
string$tableNameIs the tablename to check: If "pages" table then edit,new,delete and editcontent permissions can be checked. Other tables will be checked for "editcontent" only (and $type will be ignored)
string$actionTypeFor $tableName='pages' this can be 'edit' (2), 'new' (8 or 16), 'delete' (4), 'editcontent' (16). For all other tables this is ignored. (16 is used)
Returns
boolean public (used by typo3/alt_clickmenu.php)

Definition at line 893 of file BackendUserAuthentication.php.

References $result, and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

◆ isRTE()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::isRTE ( )

Returns TRUE if the RTE (Rich Text Editor) can be enabled for the user Strictly this is not permissions being checked but rather a series of settings like a loaded extension, browser/client type and a configuration option in ->uc[edit_RTE] The reasons for a FALSE return can be found in $this->RTE_errors

Returns
boolean
Todo:
Define visibility

Definition at line 612 of file BackendUserAuthentication.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\RTEgetObj().

◆ isUserAllowedToLogin()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::isUserAllowedToLogin ( )
protected

Determines whether a backend user is allowed to access the backend.

The conditions are:

  • backend user is a regular user and adminOnly is not defined
  • backend user is an admin user
  • backend user is used in CLI context and adminOnly is explicitly set to "2"
  • backend user is being controlled by an admin user
Returns
boolean Whether a backend user is allowed to access the backend

Definition at line 2560 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\BEenableFields(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\backendCheckLogin(), and TYPO3\CMS\Backend\FrontendBackendUserAuthentication\checkBackendAccessSettingsFromInitPhp().

◆ jsConfirmation()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::jsConfirmation (   $bitmask)

Returns TRUE or FALSE, depending if an alert popup (a javascript confirmation) should be shown call like $GLOBALS['BE_USER']->jsConfirmation($BITMASK)

1 - typeChange 2 - copy/move/paste 4 - delete 8 - frontend editing 128 - other (not used yet)

Parameters
integer$bitmaskBitmask
Returns
boolean TRUE if the confirmation should be shown
Todo:
Define visibility

Definition at line 1294 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfig().

◆ logoff()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::logoff ( )

Logs out the current user and clears the form protection tokens.

Definition at line 2581 of file BackendUserAuthentication.php.

References $GLOBALS, and TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get().

◆ mayMakeShortcut()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::mayMakeShortcut ( )

Returns TRUE if the BE_USER is allowed to create shortcuts in the backend modules

Returns
boolean
Todo:
Define visibility

Definition at line 926 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfigVal().

◆ modAccess()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::modAccess (   $conf,
  $exitOnError 
)

Checks access to a backend module with the $MCONF passed as first argument

Parameters
array$conf$MCONF array of a backend module!
boolean$exitOnErrorIf set, an array will issue an error message and exit.
Exceptions

Definition at line 473 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\check(), TYPO3\CMS\Core\Utility\GeneralUtility\inList(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), and TYPO3\CMS\Backend\Utility\BackendUtility\isModuleSetInTBE_MODULES().

◆ overrideUC()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::overrideUC ( )

Override: Call this function every time the uc is updated. That is 1) by reverting to default values, 2) in the setup-module, 3) userTS changes (userauthgroup)

Returns
void

Definition at line 2478 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfigProp().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\backendSetUC().

◆ recordEditAccessInternals()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::recordEditAccessInternals (   $table,
  $idOrRow,
  $newRecord = FALSE,
  $deletedRecord = FALSE,
  $checkFullLanguageAccess = FALSE 
)

Checking if a user has editing access to a record from a $GLOBALS['TCA'] table. The checks does not take page permissions and other "environmental" things into account. It only deal with record internals; If any values in the record fields disallows it. For instance languages settings, authMode selector boxes are evaluated (and maybe more in the future). It will check for workspace dependent access. The function takes an ID (integer) or row (array) as second argument.

Parameters
string$tableTable name
mixed$idOrRowIf integer, then this is the ID of the record. If Array this just represents fields in the record.
boolean$newRecordSet, if testing a new (non-existing) record array. Will disable certain checks that doesn't make much sense in that context.
boolean$deletedRecordSet, if testing a deleted record array.
boolean$checkFullLanguageAccessSet, whenever access to all translations of the record is required
Returns
boolean TRUE if OK, otherwise FALSE
Todo:
Define visibility

Definition at line 788 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkAuthMode(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkFullLanguagesAccess(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkLanguageAccess(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

◆ resetUC()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::resetUC ( )

◆ returnWebmounts()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::returnWebmounts ( )

Returns an array with the webmounts. If no webmounts, and empty array is returned. NOTICE: Deleted pages WILL NOT be filtered out! So if a mounted page has been deleted it is STILL coming out as a webmount. This is not checked due to performance.

Returns
array
Todo:
Define visibility

Definition at line 1276 of file BackendUserAuthentication.php.

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isInWebMount().

◆ setCachedList()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::setCachedList (   $cList)

Updates the field be_users.usergroup_cached_list if the groupList of the user has changed/is different from the current list. The field "usergroup_cached_list" contains the list of groups which the user is a member of. After authentication (where these functions are called...) one can depend on this list being a representation of the exact groups/subgroups which the BE_USER has membership with.

Parameters
string$cListThe newly compiled group-list which must be compared with the current list in the user record and possibly stored if a difference is detected.
Returns
void private
Todo:
Define visibility

Definition at line 1531 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\evaluateUserSpecificFileFilterSettings(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFileMountRecords(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData().

◆ setDefaultWorkspace()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::setDefaultWorkspace ( )

◆ setTemporaryWorkspace()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::setTemporaryWorkspace (   $workspaceId)

Sets a temporary workspace in the context of the current backend user.

Parameters
integer$workspaceId
Returns
boolean

Definition at line 2137 of file BackendUserAuthentication.php.

References $result, and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspace().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\setWorkspace().

◆ setWorkspace()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::setWorkspace (   $workspaceId)

◆ setWorkspacePreview()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::setWorkspacePreview (   $previewState)

Setting workspace preview state for user:

Parameters
boolean$previewStateState of user preview.
Returns
void
Todo:
Define visibility

Definition at line 2167 of file BackendUserAuthentication.php.

◆ simplelog()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::simplelog (   $message,
  $extKey = '',
  $error = 0 
)

Simple logging function

Parameters
string$messageLog message
string$extKeyOption extension key / module name
integer$errorError level. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin)
Returns
integer Log entry UID
Todo:
Define visibility

Definition at line 2254 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\checkLogFailures(), TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), TYPO3\CMS\Core\Utility\MailUtility\getSystemFrom(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\writelog().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\setWorkspace().

◆ workspaceAllowAutoCreation()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspaceAllowAutoCreation (   $table,
  $id,
  $recpid 
)

Evaluates if auto creation of a version of a record is allowed.

Parameters
string$tableTable of the record
integer$idUID of record
integer$recpidPID of record
Returns
boolean TRUE if ok.
Todo:
Define visibility

Definition at line 1079 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$id, TYPO3\CMS\Core\Utility\GeneralUtility\deprecationLog(), and TYPO3\CMS\Backend\Utility\BackendUtility\getWorkspaceVersionOfRecord().

◆ workspaceAllowLiveRecordsInPID()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspaceAllowLiveRecordsInPID (   $pid,
  $table 
)

Check if "live" records from $table may be created or edited in this PID. If the answer is FALSE it means the only valid way to create or edit records in the PID is by versioning If the answer is 1 or 2 it means it is OK to create a record, if -1 it means that it is OK in terms of versioning because the element was within a versionized branch but NOT ok in terms of the state the root point had!

Parameters
integer$pidPID value to check for. OBSOLETE!
string$tableTable name
Returns
mixed Returns FALSE if a live record cannot be created and must be versionized in order to do so. 2 means a) Workspace is "Live" or workspace allows "live edit" of records from non-versionized tables (and the $table is not versionizable). 1 and -1 means the pid is inside a versionized branch where -1 means that the branch-point did NOT allow a new record according to its state.
Todo:
Define visibility

Definition at line 1032 of file BackendUserAuthentication.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCannotEditRecord(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCreateNewRecord().

◆ workspaceCannotEditOfflineVersion()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspaceCannotEditOfflineVersion (   $table,
  $recData 
)

Evaluates if a user is allowed to edit the offline version

Parameters
string$tableTable of record
array$recDataInteger (record uid) or array where fields are at least: pid, t3ver_wsid, t3ver_stage (if versioningWS is set)
Returns
string String error code, telling the failure state. FALSE=All ok
See also
workspaceCannotEditRecord()
Todo:
Define visibility

Definition at line 1001 of file BackendUserAuthentication.php.

References $GLOBALS, and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCannotEditRecord().

◆ workspaceCannotEditRecord()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspaceCannotEditRecord (   $table,
  $recData 
)

Checking if editing of an existing record is allowed in current workspace if that is offline. Rules for editing in offline mode:

  • record supports versioning and is an offline version from workspace and has the corrent stage
  • or record (any) is in a branch where there is a page which is a version from the workspace and where the stage is not preventing records
Parameters
string$tableTable of record
array$recDataInteger (record uid) or array where fields are at least: pid, t3ver_wsid, t3ver_stage (if versioningWS is set)
Returns
string String error code, telling the failure state. FALSE=All ok
Todo:
Define visibility

Definition at line 943 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceAllowLiveRecordsInPID(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCheckStageForCurrent().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCannotEditOfflineVersion().

◆ workspaceCheckStageForCurrent()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspaceCheckStageForCurrent (   $stage)

Checks if an element stage allows access for the user in the current workspace In live workspace (= 0) access is always granted for any stage. Admins are always allowed. An option for custom workspaces allows members to also edit when the stage is "Review"

Parameters
integer$stageStage id from an element: -1,0 = editing, 1 = reviewer, >1 = owner
Returns
boolean TRUE if user is allowed access
Todo:
Define visibility

Definition at line 1106 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\$workspaceRec, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspaceCurrent(), TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCannotEditRecord().

◆ workspaceCreateNewRecord()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspaceCreateNewRecord (   $pid,
  $table 
)

Evaluates if a record from $table can be created in $pid

Parameters
integer$pidPage id. This value must be the _ORIG_uid if available: So when you have pages versionized as "page" or "element" you must supply the id of the page version in the workspace!
string$tableTable name
Returns
boolean TRUE if OK.
Todo:
Define visibility

Definition at line 1056 of file BackendUserAuthentication.php.

References $GLOBALS, and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceAllowLiveRecordsInPID().

◆ workspaceInit()

◆ workspacePublishAccess()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspacePublishAccess (   $wsid)

Returns TRUE if the user has access to publish content from the workspace ID given. Admin-users are always granted access to do this If the workspace ID is 0 (live) all users have access also For custom workspaces it depends on whether the user is owner OR like with draft workspace if the user has access to Live workspace.

Parameters
integer$wsidWorkspace UID; 0,1+
Returns
boolean Returns TRUE if the user has access to publish content from the workspace ID given.
Todo:
Define visibility

Definition at line 1171 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspace(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

◆ workspaceSwapAccess()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspaceSwapAccess ( )

Workspace swap-mode access?

Returns
boolean Returns TRUE if records can be swapped in the current workspace, otherwise FALSE
Todo:
Define visibility

Definition at line 1202 of file BackendUserAuthentication.php.

◆ writelog()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::writelog (   $type,
  $action,
  $error,
  $details_nr,
  $details,
  $data,
  $tablename = '',
  $recuid = '',
  $recpid = '',
  $event_pid = -1,
  $NEWid = '',
  $userId = 0 
)

Writes an entry in the logfile/table Documentation in "TYPO3 Core API"

Parameters
integer$typeDenotes which module that has submitted the entry. See "TYPO3 Core API". Use "4" for extensions.
integer$actionDenotes which specific operation that wrote the entry. Use "0" when no sub-categorizing applies
integer$errorFlag. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin)
integer$details_nrThe message number. Specific for each $type and $action. This will make it possible to translate errormessages to other languages
string$detailsDefault text that follows the message (in english!). Possibly translated by identification through type/action/details_nr
array$dataData that follows the log. Might be used to carry special information. If an array the first 5 entries (0-4) will be sprintf'ed with the details-text
string$tablenameTable name. Special field used by tce_main.php.
int | string$recuidRecord UID. Special field used by tce_main.php.
int | string$recpidRecord PID. Special field used by tce_main.php. OBSOLETE
integer$event_pidThe page_uid (pid) where the event occurred. Used to select log-content for specific pages.
string$NEWidSpecial field used by tce_main.php. NEWid string of newly created records.
integer$userIdAlternative Backend User ID (used for logging login actions where this is not yet known).
Returns
integer Log entry ID.
Todo:
Define visibility

Definition at line 2220 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv().

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\simplelog().

Member Data Documentation

◆ $auth_timeout_field

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$auth_timeout_field = 6000

Definition at line 308 of file BackendUserAuthentication.php.

◆ $challengeStoredInCookie

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$challengeStoredInCookie = TRUE

Definition at line 314 of file BackendUserAuthentication.php.

◆ $checkWorkspaceCurrent_cache

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$checkWorkspaceCurrent_cache = NULL

◆ $dataLists

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$dataLists
Initial value:
= array(
'webmount_list' => '',
'filemount_list' => '',
'file_permissions' => '',
'modList' => '',
'tables_select' => '',
'tables_modify' => '',
'pagetypes_select' => '',
'non_exclude_fields' => '',
'explicit_allowdeny' => '',
'allowed_languages' => '',
'workspace_perms' => '',
'custom_options' => ''
)

Definition at line 104 of file BackendUserAuthentication.php.

◆ $enablecolumns

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$enablecolumns
Initial value:
= array(
'rootLevel' => 1,
'deleted' => 'deleted',
'disabled' => 'disable',
'starttime' => 'starttime',
'endtime' => 'endtime'
)

Definition at line 251 of file BackendUserAuthentication.php.

◆ $errorMsg

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$errorMsg = ''

Definition at line 187 of file BackendUserAuthentication.php.

◆ $filePermissions

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$filePermissions
protected

◆ $fileStorages

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$fileStorages
protected

◆ $firstMainGroup

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$firstMainGroup = 0

Definition at line 319 of file BackendUserAuthentication.php.

◆ $formfield_chalvalue

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$formfield_chalvalue = 'challenge'

Definition at line 278 of file BackendUserAuthentication.php.

◆ $formfield_status

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$formfield_status = 'login_status'

Definition at line 285 of file BackendUserAuthentication.php.

◆ $formfield_uident

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$formfield_uident = 'userident'

Definition at line 271 of file BackendUserAuthentication.php.

◆ $formfield_uname

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$formfield_uname = 'username'

Definition at line 264 of file BackendUserAuthentication.php.

◆ $groupData

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$groupData
Initial value:
= array(
'filemounts' => array()
)

Definition at line 53 of file BackendUserAuthentication.php.

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getFileMountRecords().

◆ $groupList

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$groupList = ''

Definition at line 76 of file BackendUserAuthentication.php.

◆ $includeGroupArray

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$includeGroupArray = array()

Definition at line 131 of file BackendUserAuthentication.php.

◆ $includeHierarchy

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$includeHierarchy = array()

Definition at line 124 of file BackendUserAuthentication.php.

◆ $lastLogin_column

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$lastLogin_column = 'lastlogin'

Definition at line 245 of file BackendUserAuthentication.php.

◆ $OS

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$OS = ''

Definition at line 138 of file BackendUserAuthentication.php.

◆ $RTE_errors

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$RTE_errors = array()

Definition at line 180 of file BackendUserAuthentication.php.

◆ $session_table

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$session_table = 'be_sessions'

Definition at line 211 of file BackendUserAuthentication.php.

◆ $TSdataArray

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$TSdataArray = array()

Definition at line 145 of file BackendUserAuthentication.php.

◆ $uc

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$uc

◆ $uc_default

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$uc_default
Initial value:
= array(
'interfaceSetup' => '',
'moduleData' => array(),
'thumbnailsByDefault' => 1,
'emailMeAtLogin' => 0,
'noMenuMode' => 0,
'startModule' => 'help_aboutmodules',
'hideSubmoduleIcons' => 0,
'helpText' => 1,
'titleLen' => 50,
'edit_showFieldHelp' => 'icon',
'edit_RTE' => '1',
'edit_docModuleUpload' => '1',
'navFrameWidth' => '',
'navFrameResizable' => 0,
'resizeTextareas' => 1,
'resizeTextareas_MaxHeight' => 500,
'resizeTextareas_Flexible' => 0
)

Definition at line 338 of file BackendUserAuthentication.php.

◆ $user_table

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$user_table = 'be_users'

Definition at line 218 of file BackendUserAuthentication.php.

◆ $usergroup_column

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$usergroup_column = 'usergroup'

Definition at line 38 of file BackendUserAuthentication.php.

◆ $usergroup_table

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$usergroup_table = 'be_groups'

Definition at line 45 of file BackendUserAuthentication.php.

◆ $userGroups

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userGroups = array()

Definition at line 62 of file BackendUserAuthentication.php.

◆ $userGroupsUID

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userGroupsUID = array()

Definition at line 69 of file BackendUserAuthentication.php.

◆ $userid_column

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userid_column = 'uid'

Definition at line 239 of file BackendUserAuthentication.php.

◆ $userident_column

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userident_column = 'password'

Definition at line 232 of file BackendUserAuthentication.php.

◆ $username_column

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$username_column = 'username'

Definition at line 225 of file BackendUserAuthentication.php.

◆ $userTS

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userTS = array()

◆ $userTS_dontGetCached

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userTS_dontGetCached = FALSE

Definition at line 173 of file BackendUserAuthentication.php.

◆ $userTS_text

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userTS_text = ''

Definition at line 152 of file BackendUserAuthentication.php.

◆ $userTSUpdated

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userTSUpdated = FALSE

Definition at line 166 of file BackendUserAuthentication.php.

◆ $workspace

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$workspace = -99

◆ $workspaceRec

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$workspaceRec = array()

◆ $writeAttemptLog

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$writeAttemptLog = TRUE

Definition at line 299 of file BackendUserAuthentication.php.

◆ $writeStdLog

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$writeStdLog = TRUE

Definition at line 292 of file BackendUserAuthentication.php.