TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Authentication\BackendUserAuthentication Class Reference
Inheritance diagram for TYPO3\CMS\Core\Authentication\BackendUserAuthentication:
TYPO3\CMS\Core\Authentication\AbstractUserAuthentication TYPO3\CMS\Backend\FrontendBackendUserAuthentication

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 ()
 
 setWebmounts (array $mountPointUids, $append=false)
 
 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 ($proceedIfNoUserIsLoggedIn=false)
 
 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 = []
 
 $userGroupsUID = []
 
 $groupList = ''
 
 $workspace = -99
 
 $workspaceRec = []
 
 $dataLists
 
 $includeHierarchy = []
 
 $includeGroupArray = []
 
 $OS = ''
 
 $TSdataArray = []
 
 $userTS_text = ''
 
 $userTS = []
 
 $userTSUpdated = false
 
 $userTS_dontGetCached = false
 
 $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_status = 'login_status'
 
 $writeStdLog = true
 
 $writeAttemptLog = true
 
 $auth_timeout_field = 6000
 
 $firstMainGroup = 0
 
 $uc
 
 $uc_default
 
- Public Attributes inherited from TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 $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_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
 
 $loginFailure = false
 
 $loginSessionStarted = false
 
 $user = null
 
 $get_URL_ID = ''
 
 $newSessionID = false
 
 $forceSetCookie = false
 
 $dontSetCookie = false
 
 $loginType = ''
 
 $svConfig = []
 
 $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.

Definition at line 31 of file BackendUserAuthentication.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Definition at line 307 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.

Definition at line 1916 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 (   $proceedIfNoUserIsLoggedIn = false)

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. the TYPO3 CMS bootsrap

Parameters
bool$proceedIfNoUserIsLoggedInif this option is set, then there won't be a redirect to the login screen of the Backend - used for areas in the backend which do not need user rights like the login page.
Exceptions

Definition at line 2324 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\backendSetUC(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkLockToIP(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData(), TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isUserAllowedToLogin(), and TYPO3\CMS\Core\Utility\HttpUtility\redirect().

◆ 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
int Bitwise representation of the users permissions in relation to input page row, $row

Definition at line 510 of file BackendUserAuthentication.php.

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

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
bool TRUE if permission is granted (that is, the value was found in the groupData list - or the BE_USER is "admin")

Definition at line 568 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
bool Whether access is granted or not

Definition at line 587 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
bool Returns TRUE if a CLI user was loaded, otherwise FALSE!
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Please implement this functionality in your own application directly from the outside

Definition at line 2357 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction(), 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
bool

Definition at line 670 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
int$langValueLanguage value to evaluate
Returns
bool Returns TRUE if the language value is allowed, otherwise FALSE.

Definition at line 650 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
bool TRUE, if IP address validates OK (or no check is done at all)

Definition at line 2300 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.

Definition at line 1984 of file BackendUserAuthentication.php.

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

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()

Definition at line 2059 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
int$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
bool

Definition at line 358 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 1684 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 an eternal recursion.
Returns
void private

Definition at line 1378 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(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW.

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 1510 of file BackendUserAuthentication.php.

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

◆ getCookieName()

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

◆ 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 1889 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
int Default workspace id. If no workspace is available it will be "-99

Definition at line 2139 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()

◆ 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 1729 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)

◆ 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 1668 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
int$permsPermission mask to use, see function description
Returns
string Part of where clause. Prefix " AND " to this.

Definition at line 469 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.

Definition at line 1142 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()

Definition at line 1185 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
bool

Definition at line 321 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
int$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 380 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\Backend\Utility\BackendUtility\getRecord(), 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
int$groupIdGroup ID to look for in $this->groupList
Returns
bool

Definition at line 334 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
int$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
bool public (used by ClickMenuController)

Definition at line 818 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_DELETE, TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_NEW.

◆ isRTE()

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

Returns TRUE if the RTE (Rich Text Editor) is enabled for the user.

Returns
bool

Definition at line 553 of file BackendUserAuthentication.php.

◆ 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
bool Whether a backend user is allowed to access the backend

Definition at line 2533 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). See .

Parameters
int$bitmaskBitmask
Returns
bool TRUE if the confirmation should be shown

Definition at line 1231 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Type\Enumeration\cast(), and 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 2555 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
bool

Definition at line 851 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!
bool$exitOnErrorIf set, an array will issue an error message and exit.
Exceptions

Definition at line 417 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 2449 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 (int) 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.
bool$newRecordSet, if testing a new (non-existing) record array. Will disable certain checks that doesn't make much sense in that context.
bool$deletedRecordSet, if testing a deleted record array.
bool$checkFullLanguageAccessSet, whenever access to all translations of the record is required
Returns
bool TRUE if OK, otherwise FALSE

Definition at line 712 of file BackendUserAuthentication.php.

References $GLOBALS, $params, TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkAuthMode(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkFullLanguagesAccess(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkLanguageAccess(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), 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

Definition at line 1199 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

Definition at line 1463 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
int$workspaceId
Returns
bool

Definition at line 2095 of file BackendUserAuthentication.php.

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

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

◆ setWebmounts()

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::setWebmounts ( array  $mountPointUids,
  $append = false 
)

Initializes the given mount points for the current Backend user.

Parameters
array$mountPointUidsPage UIDs that should be used as web mountpoints
bool$appendIf TRUE the given mount point will be appended. Otherwise the current mount points will be replaced.
Returns
void

Definition at line 1211 of file BackendUserAuthentication.php.

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

◆ setWorkspace()

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

◆ setWorkspacePreview()

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

Setting workspace preview state for user:

Parameters
bool$previewStateState of user preview.
Returns
void

Definition at line 2126 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
int$errorError level. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin)
Returns
int Log entry UID

Definition at line 2220 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
int$idUID of record
int$recpidPID of record
Returns
bool TRUE if ok.

Definition at line 1004 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$id, 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
int$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.

Definition at line 957 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()

Definition at line 926 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), 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

Definition at line 868 of file BackendUserAuthentication.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), 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
int$stageStage id from an element: -1,0 = editing, 1 = reviewer, >1 = owner
Returns
bool TRUE if user is allowed access

Definition at line 1029 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\$workspaceRec, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspaceCurrent(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), 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
int$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
bool TRUE if OK.

Definition at line 981 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
int$wsidWorkspace UID; 0,1+
Returns
bool Returns TRUE if the user has access to publish content from the workspace ID given.

Definition at line 1094 of file BackendUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspace(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT.

◆ workspaceSwapAccess()

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

Workspace swap-mode access?

Returns
bool Returns TRUE if records can be swapped in the current workspace, otherwise FALSE

Definition at line 1125 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
int$typeDenotes which module that has submitted the entry. See "TYPO3 Core API". Use "4" for extensions.
int$actionDenotes which specific operation that wrote the entry. Use "0" when no sub-categorizing applies
int$errorFlag. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin)
int$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
int$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.
int$userIdAlternative Backend User ID (used for logging login actions where this is not yet known).
Returns
int Log entry ID.

Definition at line 2179 of file BackendUserAuthentication.php.

References $GLOBALS, and 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 263 of file BackendUserAuthentication.php.

◆ $checkWorkspaceCurrent_cache

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

◆ $dataLists

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$dataLists
Initial value:
= [
'webmount_list' => ''

Definition at line 95 of file BackendUserAuthentication.php.

◆ $enablecolumns

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$enablecolumns
Initial value:
= [
'rootLevel' => 1

Definition at line 219 of file BackendUserAuthentication.php.

◆ $errorMsg

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

Definition at line 163 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 268 of file BackendUserAuthentication.php.

◆ $formfield_status

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

Definition at line 243 of file BackendUserAuthentication.php.

◆ $formfield_uident

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

Definition at line 237 of file BackendUserAuthentication.php.

◆ $formfield_uname

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

Definition at line 231 of file BackendUserAuthentication.php.

◆ $groupData

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$groupData
Initial value:
= [
'filemounts' => []
]

Definition at line 50 of file BackendUserAuthentication.php.

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

◆ $groupList

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

Definition at line 70 of file BackendUserAuthentication.php.

◆ $includeGroupArray

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$includeGroupArray = []

Definition at line 120 of file BackendUserAuthentication.php.

◆ $includeHierarchy

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$includeHierarchy = []

Definition at line 114 of file BackendUserAuthentication.php.

◆ $lastLogin_column

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

Definition at line 214 of file BackendUserAuthentication.php.

◆ $OS

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

Definition at line 127 of file BackendUserAuthentication.php.

◆ $session_table

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

Definition at line 185 of file BackendUserAuthentication.php.

◆ $TSdataArray

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$TSdataArray = []

Definition at line 133 of file BackendUserAuthentication.php.

◆ $uc

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

◆ $uc_default

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$uc_default
Initial value:
= [
'interfaceSetup' => ''

Definition at line 285 of file BackendUserAuthentication.php.

◆ $user_table

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

Definition at line 191 of file BackendUserAuthentication.php.

◆ $usergroup_column

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

Definition at line 37 of file BackendUserAuthentication.php.

◆ $usergroup_table

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

Definition at line 43 of file BackendUserAuthentication.php.

◆ $userGroups

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userGroups = []

Definition at line 58 of file BackendUserAuthentication.php.

◆ $userGroupsUID

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userGroupsUID = []

Definition at line 64 of file BackendUserAuthentication.php.

◆ $userid_column

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

Definition at line 209 of file BackendUserAuthentication.php.

◆ $userident_column

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

Definition at line 203 of file BackendUserAuthentication.php.

◆ $username_column

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

Definition at line 197 of file BackendUserAuthentication.php.

◆ $userTS

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$userTS = []

◆ $userTS_dontGetCached

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

Definition at line 157 of file BackendUserAuthentication.php.

◆ $userTS_text

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

Definition at line 139 of file BackendUserAuthentication.php.

◆ $userTSUpdated

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

Definition at line 151 of file BackendUserAuthentication.php.

◆ $workspace

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

◆ $workspaceRec

TYPO3\CMS\Core\Authentication\BackendUserAuthentication::$workspaceRec = []

◆ $writeAttemptLog

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

Definition at line 255 of file BackendUserAuthentication.php.

◆ $writeStdLog

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

Definition at line 249 of file BackendUserAuthentication.php.