TYPO3
7.6
|
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 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 () |
Protected Member Functions | |
initializeDbMountpointsInWorkspace () | |
isUserAllowedToLogin () | |
Protected Member Functions inherited from 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 AbstractUserAuthentication | |
$cookieWasSetOnCurrentRequest = false | |
$db = null | |
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 29 of file BackendUserAuthentication.php.
__construct | ( | ) |
Constructor
Definition at line 305 of file BackendUserAuthentication.php.
addTScomment | ( | $str | ) |
Creates a TypoScript comment with the string text inside.
string | $str | The text to wrap in comment prefixes and delimiters. |
Definition at line 1916 of file BackendUserAuthentication.php.
References GeneralUtility\trimExplode().
Referenced by BackendUserAuthentication\fetchGroupData(), and BackendUserAuthentication\fetchGroups().
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
bool | $proceedIfNoUserIsLoggedIn | if 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. |
\RuntimeException |
Definition at line 2322 of file BackendUserAuthentication.php.
References $url, BackendUserAuthentication\backendSetUC(), BackendUserAuthentication\checkLockToIP(), BackendUserAuthentication\fetchGroupData(), GeneralUtility\getIndpEnv(), and BackendUserAuthentication\isUserAllowedToLogin().
backendSetUC | ( | ) |
Initialize the internal ->uc array for the backend user Will make the overrides if necessary, and write the UC back to the be_users record if changes has happened
Definition at line 2394 of file BackendUserAuthentication.php.
References $GLOBALS, BackendUserAuthentication\$uc, BackendUserAuthentication\getTSConfigProp(), BackendUserAuthentication\overrideUC(), GeneralUtility\removeDotsFromTS(), AbstractUserAuthentication\unpack_uc(), and AbstractUserAuthentication\writeUC().
Referenced by BackendUserAuthentication\backendCheckLogin(), and BackendUserAuthentication\resetUC().
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)
array | $row | Input page row with all perms_* fields available. |
Definition at line 508 of file BackendUserAuthentication.php.
References $GLOBALS, Permission\ALL, GeneralUtility\callUserFunction(), BackendUserAuthentication\isAdmin(), BackendUserAuthentication\isInWebMount(), BackendUserAuthentication\isMemberOfGroup(), and Permission\NOTHING.
Referenced by BackendUserAuthentication\doesUserHaveAccess().
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.
string | $type | The type value; "webmounts", "filemounts", "pagetypes_select", "tables_select", "tables_modify", "non_exclude_fields", "modules |
string | $value | String to search for in the groupData-list |
Definition at line 566 of file BackendUserAuthentication.php.
References GeneralUtility\inList(), and BackendUserAuthentication\isAdmin().
Referenced by BackendUserAuthentication\checkLanguageAccess(), and BackendUserAuthentication\modAccess().
checkAuthMode | ( | $table, | |
$field, | |||
$value, | |||
$authMode | |||
) |
Checking the authMode of a select field with authMode set
string | $table | Table name |
string | $field | Field name (must be configured in TCA and of type "select" with authMode set!) |
string | $value | Value to evaluation (single value, must not contain any of the chars ":,|") |
string | $authMode | Auth mode keyword (explicitAllow, explicitDeny, individual) |
Definition at line 585 of file BackendUserAuthentication.php.
References $GLOBALS, GeneralUtility\inList(), and BackendUserAuthentication\isAdmin().
Referenced by BackendUserAuthentication\recordEditAccessInternals().
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)
Definition at line 2355 of file BackendUserAuthentication.php.
References $GLOBALS, BackendUserAuthentication\isAdmin(), GeneralUtility\logDeprecatedFunction(), and AbstractUserAuthentication\setBeUserByName().
checkFullLanguagesAccess | ( | $table, | |
$record | |||
) |
Check if user has access to all existing localizations for a certain record
string | $table | The table |
array | $record | The current record |
Definition at line 668 of file BackendUserAuthentication.php.
References $GLOBALS, BackendUserAuthentication\checkLanguageAccess(), BackendUtility\getRecordsByField(), and BackendUtility\isTableLocalizable().
Referenced by BackendUserAuthentication\recordEditAccessInternals().
checkLanguageAccess | ( | $langValue | ) |
Checking if a language value (-1, 0 and >0 for sys_language records) is allowed to be edited by the user.
int | $langValue | Language value to evaluate |
Definition at line 648 of file BackendUserAuthentication.php.
References BackendUserAuthentication\check().
Referenced by BackendUserAuthentication\checkFullLanguagesAccess(), and BackendUserAuthentication\recordEditAccessInternals().
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)
Definition at line 2298 of file BackendUserAuthentication.php.
References $GLOBALS, GeneralUtility\cmpIP(), GeneralUtility\getIndpEnv(), and BackendUserAuthentication\getTSConfigVal().
Referenced by BackendUserAuthentication\backendCheckLogin().
checkWorkspace | ( | $wsRec, | |
$fields = 'uid , |
|||
title | , | ||
adminusers | , | ||
members | , | ||
reviewers | , | ||
publish_access | , | ||
stagechg_notification' | |||
) |
Checking if a workspace is allowed for backend user
mixed | $wsRec | If 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 | $fields | List of fields to select. Default fields are: uid,title,adminusers,members,reviewers,publish_access,stagechg_notification |
Definition at line 1984 of file BackendUserAuthentication.php.
References BackendUtility\deleteClause(), GeneralUtility\inList(), BackendUserAuthentication\isAdmin(), and Permission\PAGE_SHOW.
Referenced by BackendUserAuthentication\checkWorkspaceCurrent(), BackendUserAuthentication\getDefaultWorkspace(), BackendUserAuthentication\setDefaultWorkspace(), BackendUserAuthentication\setTemporaryWorkspace(), and BackendUserAuthentication\workspacePublishAccess().
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.
Definition at line 2059 of file BackendUserAuthentication.php.
References BackendUserAuthentication\$checkWorkspaceCurrent_cache, and BackendUserAuthentication\checkWorkspace().
Referenced by BackendUserAuthentication\workspaceCheckStageForCurrent().
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.
array | $row | Is the pagerow for which the permissions is checked |
int | $perms | Is 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. |
Definition at line 356 of file BackendUserAuthentication.php.
References BackendUserAuthentication\calcPerms().
Referenced by FrontendBackendUserAuthentication\extPageReadAccess().
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
Definition at line 1684 of file BackendUserAuthentication.php.
fetchGroupData | ( | ) |
Initializes a lot of stuff like the access-lists, database-mountpoints and filemountpoints This method is called by ->backendCheckLogin() (from extending BackendUserAuthentication) if the backend user login has verified OK. Generally this is required initialization of a backend user.
Definition at line 1252 of file BackendUserAuthentication.php.
References $GLOBALS, BackendUserAuthentication\addTScomment(), BackendUserAuthentication\fetchGroups(), BackendUserAuthentication\getPagePermsClause(), BackendUserAuthentication\getTSConfigVal(), BackendUserAuthentication\isAdmin(), GeneralUtility\makeInstance(), BackendUserAuthentication\setCachedList(), GeneralUtility\uniqueList(), and BackendUserAuthentication\workspaceInit().
Referenced by BackendUserAuthentication\backendCheckLogin().
fetchGroups | ( | $grList, | |
$idList = '' |
|||
) |
Fetches the group records, subgroups and fills internal arrays. Function is called recursively to fetch subgroups
string | $grList | Commalist of be_groups uid numbers |
string | $idList | List of already processed be_groups-uids so the function will not fall into an eternal recursion. |
Definition at line 1377 of file BackendUserAuthentication.php.
References $GLOBALS, BackendUserAuthentication\addTScomment(), GeneralUtility\callUserFunction(), GeneralUtility\getIndpEnv(), GeneralUtility\getUserObj(), GeneralUtility\inList(), GeneralUtility\intExplode(), Permission\PAGE_EDIT, and Permission\PAGE_SHOW.
Referenced by BackendUserAuthentication\fetchGroupData().
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.
Definition at line 1509 of file BackendUserAuthentication.php.
References GeneralUtility\trimExplode().
|
static |
Getter for the cookie name
Definition at line 2282 of file BackendUserAuthentication.php.
References $GLOBALS.
Referenced by LoginController\checkRedirect(), BackendUserSessionRepository\switchBackToOriginalUser(), and BackendUserController\switchUser().
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.
Definition at line 1889 of file BackendUserAuthentication.php.
getDefaultWorkspace | ( | ) |
Return default workspace ID for user, If EXT:workspaces is not installed the user will be pushed the the Live workspace
Definition at line 2139 of file BackendUserAuthentication.php.
References BackendUserAuthentication\checkWorkspace(), BackendUtility\deleteClause(), and elseif.
Referenced by BackendUserAuthentication\setDefaultWorkspace().
getFileMountRecords | ( | ) |
Returns an array of file mount records, taking workspaces and user home and group home directories into account Needs to be called AFTER the groups have been loaded.
Definition at line 1542 of file BackendUserAuthentication.php.
References $GLOBALS, BackendUserAuthentication\$groupData, BackendUtility\BEenableFields(), BackendUtility\deleteClause(), BackendUserAuthentication\getTSConfigVal(), GeneralUtility\intExplode(), Permission\PAGE_EDIT, and GeneralUtility\trimExplode().
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 }
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
Definition at line 1729 of file BackendUserAuthentication.php.
References BackendUserAuthentication\$filePermissions, BackendUserAuthentication\getTSConfigProp(), BackendUserAuthentication\isAdmin(), and GeneralUtility\trimExplode().
Referenced by BackendUserAuthentication\getFilePermissionsForStorage().
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.
\TYPO3\CMS\Core\Resource\ResourceStorage | $storageObject |
Definition at line 1789 of file BackendUserAuthentication.php.
References BackendUserAuthentication\getFilePermissions(), BackendUserAuthentication\getTSConfigProp(), and BackendUserAuthentication\isAdmin().
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.
Definition at line 1668 of file BackendUserAuthentication.php.
References BackendUserAuthentication\$fileStorages.
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.
int | $perms | Permission mask to use, see function description |
Definition at line 467 of file BackendUserAuthentication.php.
References $GLOBALS, GeneralUtility\callUserFunction(), and BackendUserAuthentication\isAdmin().
Referenced by BackendUserAuthentication\fetchGroupData(), and BackendUserAuthentication\isInWebMount().
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!
string | $objectString | Pointer to an "object" in the TypoScript array, fx. 'options.dontMountAdminMounts' |
array | string | $config | Optional TSconfig array: If array, then this is used and not $this->userTS. If not array, $this->userTS is used. |
Definition at line 1140 of file BackendUserAuthentication.php.
References BackendUserAuthentication\$userTS, and GeneralUtility\trimExplode().
Referenced by BackendUserAuthentication\getTSConfigProp(), BackendUserAuthentication\getTSConfigVal(), and BackendUserAuthentication\jsConfirmation().
getTSConfigProp | ( | $objectString | ) |
Returns the "properties" of the $objectString from the BE_USERS "User TSconfig" array
string | $objectString | Object string, eg. "somestring.someproperty.somesubproperty |
Definition at line 1183 of file BackendUserAuthentication.php.
References BackendUserAuthentication\getTSConfig().
Referenced by BackendUserAuthentication\backendSetUC(), BackendUserAuthentication\getFilePermissions(), BackendUserAuthentication\getFilePermissionsForStorage(), FrontendBackendUserAuthentication\initializeAdminPanel(), and BackendUserAuthentication\overrideUC().
getTSConfigVal | ( | $objectString | ) |
Returns the "value" of the $objectString from the BE_USERS "User TSconfig" array
string | $objectString | Object string, eg. "somestring.someproperty.somesubproperty |
Definition at line 1170 of file BackendUserAuthentication.php.
References BackendUserAuthentication\getTSConfig().
Referenced by BackendUserAuthentication\checkLockToIP(), BackendUserAuthentication\fetchGroupData(), BackendUserAuthentication\getFileMountRecords(), BackendUserAuthentication\mayMakeShortcut(), and BackendUserAuthentication\workspaceInit().
|
protected |
Limiting the DB mountpoints if there any selected in the workspace record
Definition at line 1952 of file BackendUserAuthentication.php.
References GeneralUtility\intExplode(), and BackendUserAuthentication\isInWebMount().
Referenced by BackendUserAuthentication\workspaceInit().
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.
Definition at line 319 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\calcPerms(), BackendUserAuthentication\check(), BackendUserAuthentication\checkAuthMode(), BackendUserAuthentication\checkCLIuser(), BackendUserAuthentication\checkWorkspace(), BackendUserAuthentication\fetchGroupData(), BackendUserAuthentication\getFilePermissions(), BackendUserAuthentication\getFilePermissionsForStorage(), BackendUserAuthentication\getPagePermsClause(), BackendUserAuthentication\isInWebMount(), BackendUserAuthentication\isPSet(), BackendUserAuthentication\isUserAllowedToLogin(), BackendUserAuthentication\modAccess(), BackendUserAuthentication\recordEditAccessInternals(), BackendUserAuthentication\workspaceCheckStageForCurrent(), and BackendUserAuthentication\workspacePublishAccess().
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
int | $id | Page ID to check |
string | $readPerms | Content 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 | $exitOnError | If set, then the function will exit with an error message. |
\RuntimeException |
Definition at line 378 of file BackendUserAuthentication.php.
References $GLOBALS, AbstractUserAuthentication\$id, BackendUtility\BEgetRootLine(), BackendUserAuthentication\getPagePermsClause(), BackendUtility\getRecord(), BackendUserAuthentication\isAdmin(), and BackendUserAuthentication\returnWebmounts().
Referenced by BackendUserAuthentication\calcPerms(), FrontendBackendUserAuthentication\extPageReadAccess(), and BackendUserAuthentication\initializeDbMountpointsInWorkspace().
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.
int | $groupId | Group ID to look for in $this->groupList |
Definition at line 332 of file BackendUserAuthentication.php.
References GeneralUtility\inList().
Referenced by BackendUserAuthentication\calcPerms().
isPSet | ( | $compiledPermissions, | |
$tableName, | |||
$actionType = '' |
|||
) |
Checks a type of permission against the compiled permission integer, $compiledPermissions, and in relation to table, $tableName
int | $compiledPermissions | Could typically be the "compiled permissions" integer returned by ->calcPerms |
string | $tableName | Is 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 | $actionType | For $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) |
Definition at line 816 of file BackendUserAuthentication.php.
References Permission\CONTENT_EDIT, elseif, BackendUserAuthentication\isAdmin(), Permission\PAGE_DELETE, Permission\PAGE_EDIT, and Permission\PAGE_NEW.
isRTE | ( | ) |
Returns TRUE if the RTE (Rich Text Editor) is enabled for the user.
Definition at line 551 of file BackendUserAuthentication.php.
|
protected |
Determines whether a backend user is allowed to access the backend.
The conditions are:
Definition at line 2531 of file BackendUserAuthentication.php.
References BackendUtility\BEenableFields(), elseif, and BackendUserAuthentication\isAdmin().
Referenced by BackendUserAuthentication\backendCheckLogin(), and FrontendBackendUserAuthentication\checkBackendAccessSettingsFromInitPhp().
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 .
int | $bitmask | Bitmask |
Definition at line 1229 of file BackendUserAuthentication.php.
References BackendUserAuthentication\getTSConfig().
logoff | ( | ) |
Logs out the current user and clears the form protection tokens.
Definition at line 2553 of file BackendUserAuthentication.php.
mayMakeShortcut | ( | ) |
Returns TRUE if the BE_USER is allowed to create shortcuts in the backend modules
Definition at line 849 of file BackendUserAuthentication.php.
References BackendUserAuthentication\getTSConfigVal().
modAccess | ( | $conf, | |
$exitOnError | |||
) |
Checks access to a backend module with the $MCONF passed as first argument
array | $conf | $MCONF array of a backend module! |
bool | $exitOnError | If set, an array will issue an error message and exit. |
\RuntimeException |
Definition at line 415 of file BackendUserAuthentication.php.
References BackendUserAuthentication\check(), GeneralUtility\inList(), BackendUserAuthentication\isAdmin(), and BackendUtility\isModuleSetInTBE_MODULES().
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)
Definition at line 2447 of file BackendUserAuthentication.php.
References BackendUserAuthentication\getTSConfigProp().
Referenced by BackendUserAuthentication\backendSetUC().
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.
string | $table | Table name |
mixed | $idOrRow | If integer, then this is the ID of the record. If Array this just represents fields in the record. |
bool | $newRecord | Set, if testing a new (non-existing) record array. Will disable certain checks that doesn't make much sense in that context. |
bool | $deletedRecord | Set, if testing a deleted record array. |
bool | $checkFullLanguageAccess | Set, whenever access to all translations of the record is required |
Definition at line 710 of file BackendUserAuthentication.php.
References $GLOBALS, GeneralUtility\callUserFunction(), BackendUserAuthentication\checkAuthMode(), BackendUserAuthentication\checkFullLanguagesAccess(), BackendUserAuthentication\checkLanguageAccess(), elseif, BackendUtility\getRecord(), and BackendUserAuthentication\isAdmin().
resetUC | ( | ) |
Clears the user[uc] and ->uc to blank strings. Then calls ->backendSetUC() to fill it again with reset contents
Definition at line 2458 of file BackendUserAuthentication.php.
References BackendUserAuthentication\backendSetUC().
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.
Definition at line 1197 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\isInWebMount().
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.
string | $cList | The newly compiled group-list which must be compared with the current list in the user record and possibly stored if a difference is detected. |
Definition at line 1462 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\fetchGroupData().
setDefaultWorkspace | ( | ) |
Sets the default workspace in the context of the current backend user.
Definition at line 2114 of file BackendUserAuthentication.php.
References BackendUserAuthentication\checkWorkspace(), and BackendUserAuthentication\getDefaultWorkspace().
Referenced by BackendUserAuthentication\setWorkspace().
setTemporaryWorkspace | ( | $workspaceId | ) |
Sets a temporary workspace in the context of the current backend user.
int | $workspaceId |
Definition at line 2095 of file BackendUserAuthentication.php.
References BackendUserAuthentication\checkWorkspace().
Referenced by BackendUserAuthentication\setWorkspace().
setWebmounts | ( | array | $mountPointUids, |
$append = false |
|||
) |
Initializes the given mount points for the current Backend user.
array | $mountPointUids | Page UIDs that should be used as web mountpoints |
bool | $append | If TRUE the given mount point will be appended. Otherwise the current mount points will be replaced. |
Definition at line 1209 of file BackendUserAuthentication.php.
References GeneralUtility\intExplode().
setWorkspace | ( | $workspaceId | ) |
Setting workspace ID
int | $workspaceId | ID of workspace to set for backend user. If not valid the default workspace for BE user is found and set. |
Definition at line 2073 of file BackendUserAuthentication.php.
References BackendUserAuthentication\$workspace, BackendUserAuthentication\setDefaultWorkspace(), BackendUserAuthentication\setTemporaryWorkspace(), and BackendUserAuthentication\simplelog().
Referenced by BackendUserAuthentication\workspaceInit().
setWorkspacePreview | ( | $previewState | ) |
Setting workspace preview state for user:
bool | $previewState | State of user preview. |
Definition at line 2126 of file BackendUserAuthentication.php.
simplelog | ( | $message, | |
$extKey = '' , |
|||
$error = 0 |
|||
) |
Simple logging function
string | $message | Log message |
string | $extKey | Option extension key / module name |
int | $error | Error level. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin) |
Definition at line 2218 of file BackendUserAuthentication.php.
References BackendUserAuthentication\writelog().
Referenced by BackendUserAuthentication\setWorkspace().
workspaceAllowAutoCreation | ( | $table, | |
$id, | |||
$recpid | |||
) |
Evaluates if auto creation of a version of a record is allowed.
string | $table | Table of the record |
int | $id | UID of record |
int | $recpid | PID of record |
Definition at line 1002 of file BackendUserAuthentication.php.
References $GLOBALS, AbstractUserAuthentication\$id, and BackendUtility\getWorkspaceVersionOfRecord().
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!
int | $pid | PID value to check for. OBSOLETE! |
string | $table | Table name |
Definition at line 955 of file BackendUserAuthentication.php.
References $GLOBALS.
Referenced by BackendUserAuthentication\workspaceCannotEditRecord(), and BackendUserAuthentication\workspaceCreateNewRecord().
workspaceCannotEditOfflineVersion | ( | $table, | |
$recData | |||
) |
Evaluates if a user is allowed to edit the offline version
string | $table | Table of record |
array | $recData | Integer (record uid) or array where fields are at least: pid, t3ver_wsid, t3ver_stage (if versioningWS is set) |
Definition at line 924 of file BackendUserAuthentication.php.
References $GLOBALS, BackendUtility\getRecord(), and BackendUserAuthentication\workspaceCannotEditRecord().
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:
string | $table | Table of record |
array | $recData | Integer (record uid) or array where fields are at least: pid, t3ver_wsid, t3ver_stage (if versioningWS is set) |
Definition at line 866 of file BackendUserAuthentication.php.
References $GLOBALS, elseif, BackendUtility\getRecord(), BackendUserAuthentication\workspaceAllowLiveRecordsInPID(), and BackendUserAuthentication\workspaceCheckStageForCurrent().
Referenced by BackendUserAuthentication\workspaceCannotEditOfflineVersion().
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"
int | $stage | Stage id from an element: -1,0 = editing, 1 = reviewer, >1 = owner |
Definition at line 1027 of file BackendUserAuthentication.php.
References BackendUserAuthentication\$workspaceRec, BackendUserAuthentication\checkWorkspaceCurrent(), elseif, BackendUtility\getRecord(), GeneralUtility\inList(), and BackendUserAuthentication\isAdmin().
Referenced by BackendUserAuthentication\workspaceCannotEditRecord().
workspaceCreateNewRecord | ( | $pid, | |
$table | |||
) |
Evaluates if a record from $table can be created in $pid
int | $pid | Page 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 | $table | Table name |
Definition at line 979 of file BackendUserAuthentication.php.
References $GLOBALS, elseif, and BackendUserAuthentication\workspaceAllowLiveRecordsInPID().
workspaceInit | ( | ) |
Initializing workspace. Called from within this function, see fetchGroupData()
Definition at line 1935 of file BackendUserAuthentication.php.
References BackendUserAuthentication\getTSConfigVal(), BackendUserAuthentication\initializeDbMountpointsInWorkspace(), BackendUserAuthentication\setWorkspace(), and GeneralUtility\uniqueList().
Referenced by BackendUserAuthentication\fetchGroupData().
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.
int | $wsid | Workspace UID; 0,1+ |
Definition at line 1092 of file BackendUserAuthentication.php.
References BackendUserAuthentication\checkWorkspace(), BackendUserAuthentication\isAdmin(), and Permission\PAGE_EDIT.
workspaceSwapAccess | ( | ) |
Workspace swap-mode access?
Definition at line 1123 of file BackendUserAuthentication.php.
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"
int | $type | Denotes which module that has submitted the entry. See "TYPO3 Core API". Use "4" for extensions. |
int | $action | Denotes which specific operation that wrote the entry. Use "0" when no sub-categorizing applies |
int | $error | Flag. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin) |
int | $details_nr | The message number. Specific for each $type and $action. This will make it possible to translate errormessages to other languages |
string | $details | Default text that follows the message (in english!). Possibly translated by identification through type/action/details_nr |
array | $data | Data 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 | $tablename | Table name. Special field used by tce_main.php. |
int | string | $recuid | Record UID. Special field used by tce_main.php. |
int | string | $recpid | Record PID. Special field used by tce_main.php. OBSOLETE |
int | $event_pid | The page_uid (pid) where the event occurred. Used to select log-content for specific pages. |
string | $NEWid | Special field used by tce_main.php. NEWid string of newly created records. |
int | $userId | Alternative Backend User ID (used for logging login actions where this is not yet known). |
Definition at line 2179 of file BackendUserAuthentication.php.
References elseif, and GeneralUtility\getIndpEnv().
Referenced by BackendUserAuthentication\simplelog().
$auth_timeout_field = 6000 |
Definition at line 261 of file BackendUserAuthentication.php.
$checkWorkspaceCurrent_cache = null |
Definition at line 167 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\checkWorkspaceCurrent().
$dataLists |
Definition at line 93 of file BackendUserAuthentication.php.
$enablecolumns |
Definition at line 217 of file BackendUserAuthentication.php.
$errorMsg = '' |
Definition at line 161 of file BackendUserAuthentication.php.
|
protected |
Definition at line 177 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\getFilePermissions().
|
protected |
Definition at line 172 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\getFileStorages().
$firstMainGroup = 0 |
Definition at line 266 of file BackendUserAuthentication.php.
$formfield_status = 'login_status' |
Definition at line 241 of file BackendUserAuthentication.php.
$formfield_uident = 'userident' |
Definition at line 235 of file BackendUserAuthentication.php.
$formfield_uname = 'username' |
Definition at line 229 of file BackendUserAuthentication.php.
$groupData |
Definition at line 48 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\getFileMountRecords().
$groupList = '' |
Definition at line 68 of file BackendUserAuthentication.php.
$includeGroupArray = array() |
Definition at line 118 of file BackendUserAuthentication.php.
$includeHierarchy = array() |
Definition at line 112 of file BackendUserAuthentication.php.
$lastLogin_column = 'lastlogin' |
Definition at line 212 of file BackendUserAuthentication.php.
$OS = '' |
Definition at line 125 of file BackendUserAuthentication.php.
$session_table = 'be_sessions' |
Definition at line 183 of file BackendUserAuthentication.php.
$TSdataArray = array() |
Definition at line 131 of file BackendUserAuthentication.php.
$uc |
Definition at line 272 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\backendSetUC().
$uc_default |
Definition at line 283 of file BackendUserAuthentication.php.
$user_table = 'be_users' |
Definition at line 189 of file BackendUserAuthentication.php.
$usergroup_column = 'usergroup' |
Definition at line 35 of file BackendUserAuthentication.php.
$usergroup_table = 'be_groups' |
Definition at line 41 of file BackendUserAuthentication.php.
$userGroups = array() |
Definition at line 56 of file BackendUserAuthentication.php.
$userGroupsUID = array() |
Definition at line 62 of file BackendUserAuthentication.php.
$userid_column = 'uid' |
Definition at line 207 of file BackendUserAuthentication.php.
$userident_column = 'password' |
Definition at line 201 of file BackendUserAuthentication.php.
$username_column = 'username' |
Definition at line 195 of file BackendUserAuthentication.php.
$userTS = array() |
Definition at line 143 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\getTSConfig().
$userTS_dontGetCached = false |
Definition at line 155 of file BackendUserAuthentication.php.
$userTS_text = '' |
Definition at line 137 of file BackendUserAuthentication.php.
$userTSUpdated = false |
Definition at line 149 of file BackendUserAuthentication.php.
$workspace = -99 |
Definition at line 78 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\setWorkspace().
$workspaceRec = array() |
Definition at line 84 of file BackendUserAuthentication.php.
Referenced by BackendUserAuthentication\workspaceCheckStageForCurrent().
$writeAttemptLog = true |
Definition at line 253 of file BackendUserAuthentication.php.
$writeStdLog = true |
Definition at line 247 of file BackendUserAuthentication.php.