‪TYPO3CMS  11.5
TYPO3\CMS\Workspaces\Authentication\PreviewUserAuthentication Class Reference
Inheritance diagram for TYPO3\CMS\Workspaces\Authentication\PreviewUserAuthentication:
TYPO3\CMS\Core\Authentication\BackendUserAuthentication TYPO3\CMS\Core\Authentication\AbstractUserAuthentication

Public Member Functions

 __construct ()
 
array bool checkWorkspace ($wsRec, $fields=' *')
 
string getPagePermsClause ($perms)
 
int calcPerms ($row)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
bool isAdmin ()
 
bool isMemberOfGroup ($groupId)
 
bool doesUserHaveAccess ($row, $perms)
 
int null isInWebMount ($idOrRow, $readPerms='', $exitOnError=null)
 
bool modAccess ($conf)
 
bool isSystemMaintainer ()
 
bool isRTE ()
 
bool check ($type, $value)
 
bool checkAuthMode ($table, $field, $value, $authMode)
 
bool checkLanguageAccess ($langValue)
 
bool checkFullLanguagesAccess ($table, $record)
 
bool recordEditAccessInternals ($table, $idOrRow, $newRecord=false, $deletedRecord=false, $checkFullLanguageAccess=false)
 
bool mayMakeShortcut ()
 
bool workspaceAllowsLiveEditingInTable (string $table)
 
bool workspaceCanCreateNewRecord (string $table)
 
bool workspaceCheckStageForCurrent ($stage)
 
bool workspacePublishAccess ($wsid)
 
array getTSConfig ()
 
array returnWebmounts ()
 
 setWebmounts (array $mountPointUids, $append=false)
 
 initializeWebmountsForElementBrowser ()
 
bool jsConfirmation ($bitmask)
 
 fetchGroupData ()
 
array getCategoryMountPoints ()
 
array getFileMountRecords ()
 
TYPO3 CMS Core Resource ResourceStorage[] getFileStorages ()
 
 evaluateUserSpecificFileFilterSettings ()
 
array getFilePermissions ()
 
array getFilePermissionsForStorage (ResourceStorage $storageObject)
 
TYPO3 CMS Core Resource Folder false getDefaultUploadFolder ($pid=null, $table=null, $field=null)
 
TYPO3 CMS Core Resource Folder null getDefaultUploadTemporaryFolder ()
 
 workspaceInit ()
 
array checkWorkspaceCurrent ()
 
 setWorkspace ($workspaceId)
 
bool setTemporaryWorkspace ($workspaceId)
 
 setDefaultWorkspace ()
 
int getDefaultWorkspace ()
 
int writelog ($type, $action, $error, $details_nr, $details, $data, $tablename='', $recuid='', $recpid='', $event_pid=-1, $NEWid='', $userId=0)
 
 backendCheckLogin ($proceedIfNoUserIsLoggedIn=null)
 
 initializeBackendLogin ()
 
 backendSetUC ()
 
 overrideUC ()
 
 resetUC ()
 
bool isUserAllowedToLogin ()
 
 logoff ()
 
int null getOriginalUserIdWhenInSwitchUserMode ()
 
bool isMfaSetupRequired ()
 
 isImportEnabled ()
 
 isExportEnabled ()
 
 shallDisplayDebugInformation ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 initializeUserSessionManager (?UserSessionManager $userSessionManager=null)
 
 start (ServerRequestInterface $request=null)
 
ResponseInterface appendCookieToResponse (ResponseInterface $response)
 
bool isSetSessionCookie ()
 
bool isRefreshTimeBasedCookie ()
 
 checkAuthentication (ServerRequestInterface $request=null)
 
string createSessionId ()
 
UserSession createUserSession (array $tempuser)
 
array bool fetchUserSession ($skipSessionUpdate=false)
 
 enforceNewSessionId ()
 
 removeCookie ($cookieName=null)
 
bool isCookieSet ()
 
 writeUC ($variable='')
 
 unpack_uc ($theUC='')
 
 pushModuleData ($module, $data, $noSave=0)
 
mixed getModuleData ($module, $type='')
 
mixed getSessionData ($key)
 
 setSessionData ($key, $data)
 
 setAndSaveSessionData ($key, $data)
 
array getLoginFormData ()
 
 isActiveLogin (ServerRequestInterface $request)
 
array processLoginData ($loginData)
 
array getAuthInfoArray ()
 
 writelog ($type, $action, $error, $details_nr, $details, $data, $tablename, $recuid, $recpid)
 
 setBeUserByUid ($uid)
 
 setBeUserByName ($name)
 
array getRawUserByUid ($uid)
 
array getRawUserByName ($name)
 
UserSession getSession ()
 
 __isset (string $propertyName)
 
 __set (string $propertyName, $propertyValue)
 
 __get (string $propertyName)
 
 __unset (string $propertyName)
 

Additional Inherited Members

- ‪Static Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
static string getCookieName ()
 
- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
const ROLE_SYSTEMMAINTAINER = 'systemMaintainer'
 
string $usergroup_column = 'usergroup'
 
string $usergroup_table = 'be_groups'
 
array $groupData
 
array $userGroupsUID = array( )
 
int $workspace = -99
 
array $workspaceRec = array( )
 
string $errorMsg = ''
 
string $user_table = 'be_users'
 
string $username_column = 'username'
 
string $userident_column = 'password'
 
string $userid_column = 'uid'
 
string $lastLogin_column = 'lastlogin'
 
array $enablecolumns
 
string $formfield_uname = 'username'
 
string $formfield_uident = 'userident'
 
string $formfield_status = 'login_status'
 
bool $writeStdLog = true
 
bool $writeAttemptLog = true
 
int $firstMainGroup = 0
 
array string $uc
 
array $uc_default
 
string $loginType = 'BE'
 
- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
string $name = ''
 
string $user_table = ''
 
string $usergroup_table = ''
 
string $username_column = ''
 
string $userident_column = ''
 
string $userid_column = ''
 
string $usergroup_column = ''
 
string $lastLogin_column = ''
 
array $enablecolumns
 
string $formfield_uname = ''
 
string $formfield_uident = ''
 
string $formfield_status = ''
 
bool $writeStdLog = false
 
bool $writeAttemptLog = false
 
bool $checkPid = true
 
int string $checkPid_value = 0
 
bool $loginSessionStarted = false
 
array null $user
 
array $userGroups = []
 
bool $dontSetCookie = false
 
string $loginType = ''
 
array $uc
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
array filterValidWebMounts (string $listOfWebMounts)
 
 prepareUserTsConfig ()
 
 initializeFileStorages ()
 
 initializeDbMountpointsInWorkspace ()
 
 hasEditAccessToLiveWorkspace ()
 
 releaseLockedRecords (int $userId)
 
 evaluateMfaRequirements ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 setSessionCookie ()
 
string getCookieDomain ()
 
string getCookie ($cookieName)
 
array getAuthServiceConfiguration ()
 
 handleLoginFailure ()
 
Traversable getAuthServices (string $subType, array $loginData, array $authInfo)
 
 regenerateSessionId ()
 
 updateLoginTimestamp (int $userId)
 
array null fetchValidUserFromSessionOrDestroySession (bool $skipSessionUpdate=false)
 
 performLogoff ()
 
QueryRestrictionContainerInterface userConstraints ()
 
mixed removeSensitiveLoginDataForLoggingInfo ($data, bool $isUserRecord=false)
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
array $userTS = array( )
 
bool $userTSUpdated = false
 
array null $checkWorkspaceCurrent_cache
 
TYPO3 CMS Core Resource ResourceStorage[] $fileStorages
 
array null $filePermissions
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
int $lifetime = 0
 
UserSession $userSession = null
 
UserSessionManager $userSessionManager
 
Cookie $setCookie = null
 

Detailed Description

A backend-user like preview user with read-only permissions for a certain workspace is used for previewing a workspace in the frontend without having a full backend user available.

Has

  • ‪no user[uid]
  • ‪cookie fetched from ADMCMD_prev cookie name
  • ‪read-only everywhere
  • ‪locked to a certain workspace > 0
  • ‪locked to the current page ID as webmount

This class explicitly does not derive from FrontendBackendUserAuthentication. As this user is only meant for using against GET/cookie of "ADMCMD_prev" = clicked on a preview link This user cannot use any admin panel / frontend editing capabilities.

Definition at line 45 of file PreviewUserAuthentication.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Workspaces\Authentication\PreviewUserAuthentication::__construct ( )

Constructor

Reimplemented from TYPO3\CMS\Core\Authentication\BackendUserAuthentication.

Definition at line 47 of file PreviewUserAuthentication.php.

Member Function Documentation

◆ calcPerms()

int TYPO3\CMS\Workspaces\Authentication\PreviewUserAuthentication::calcPerms (   $row)

Has read permissions on the whole workspace, but nothing else

Parameters
array$row
Returns
‪int

Reimplemented from TYPO3\CMS\Core\Authentication\BackendUserAuthentication.

Definition at line 111 of file PreviewUserAuthentication.php.

References TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW.

◆ checkWorkspace()

array bool TYPO3\CMS\Workspaces\Authentication\PreviewUserAuthentication::checkWorkspace (   $wsRec,
  $fields = '*' 
)

Checking if a workspace is allowed for backend user This method is intentionally called with setTemporaryWorkspace() to check if the workspace exists.

Parameters
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
string$fields‪List of fields to select. Default is to fetch all of them
Returns
‪array|bool Output will also show how access was granted. For preview users, if the record exists, it's a go.

Reimplemented from TYPO3\CMS\Core\Authentication\BackendUserAuthentication.

Definition at line 61 of file PreviewUserAuthentication.php.

References $fields, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getPagePermsClause()

string TYPO3\CMS\Workspaces\Authentication\PreviewUserAuthentication::getPagePermsClause (   $perms)

A preview user has read-only permissions, always.

Parameters
int$perms
Returns
‪string

Reimplemented from TYPO3\CMS\Core\Authentication\BackendUserAuthentication.

Definition at line 97 of file PreviewUserAuthentication.php.

References TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW.