Documentation TYPO3 par Ameos |
Public Member Functions | |
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) | |
recordEditAccessInternals ($table, $idOrRow, $newRecord=FALSE) | |
isPSet ($lCP, $table, $type='') | |
mayMakeShortcut () | |
workspaceCannotEditRecord ($table, $recData) | |
workspaceCannotEditOfflineVersion ($table, $recData) | |
workspaceAllowLiveRecordsInPID ($pid, $table) | |
workspaceCreateNewRecord ($pid, $table) | |
workspaceAllowAutoCreation ($table, $id, $recpid) | |
workspaceCheckStageForCurrent ($stage) | |
workspacePublishAccess ($wsid) | |
workspaceSwapAccess () | |
workspaceVersioningTypeAccess ($type) | |
workspaceVersioningTypeGetClosest ($type) | |
getTSConfig ($objectString, $config='') | |
getTSConfigVal ($objectString) | |
getTSConfigProp ($objectString) | |
inList ($in_list, $item) | |
returnWebmounts () | |
returnFilemounts () | |
jsConfirmation ($bitmask) | |
fetchGroupData () | |
fetchGroups ($grList, $idList='') | |
setCachedList ($cList) | |
addFileMount ($title, $altTitle, $path, $webspace, $type) | |
addTScomment ($str) | |
workspaceInit () | |
checkWorkspace ($wsRec, $fields='uid, title, adminusers, members, reviewers, publish_access, stagechg_notification') | |
checkWorkspaceCurrent () | |
setWorkspace ($workspaceId) | |
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) | |
checkLogFailures ($email, $secondsBack=3600, $max=3) | |
Public Attributes | |
$usergroup_column = 'usergroup' | |
$usergroup_table = 'be_groups' | |
$groupData | |
$workspace = -99 | |
$workspaceRec = array() | |
$userGroups = Array() | |
$userGroupsUID = Array() | |
$groupList = '' | |
$dataLists | |
$includeHierarchy = array() | |
$includeGroupArray = array() | |
$OS = '' | |
$TSdataArray = array() | |
$userTS_text = '' | |
$userTS = array() | |
$userTSUpdated = 0 | |
$userTS_dontGetCached = 0 | |
$RTE_errors = array() | |
$errorMsg = '' | |
$checkWorkspaceCurrent_cache = NULL |
Definition at line 135 of file class.t3lib_userauthgroup.php.
|
Adds a filemount to the users array of filemounts, $this->groupData['filemounts'][hash_key] = Array ('name'=>$name, 'path'=>$path, 'type'=>$type); Is a part of the authentication proces of the user. A final requirement for a path being mounted is that a) it MUST return true on is_dir(), b) must contain either PATH_site+'fileadminDir' OR 'lockRootPath' - if lockRootPath is set - as first part of string! Paths in the mounted information will always be absolute and have a trailing slash.
Definition at line 1286 of file class.t3lib_userauthgroup.php. References t3lib_div::isFirstPartOfStr(), and t3lib_div::validPathStr(). |
|
Creates a TypoScript comment with the string text inside.
Definition at line 1333 of file class.t3lib_userauthgroup.php. References t3lib_div::trimExplode(). |
|
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)
Definition at line 367 of file class.t3lib_userauthgroup.php. References t3lib_div::callUserFunction(). Referenced by doesUserHaveAccess(). |
|
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.
Definition at line 439 of file class.t3lib_userauthgroup.php. Referenced by t3lib_tsfeBeUserAuth::ext_makeToolBar(), and modAccess(). |
|
Checking the authMode of a select field with authMode set
Definition at line 456 of file class.t3lib_userauthgroup.php. References t3lib_div::loadTCA(). |
|
Checking if a language value (-1, 0 and >0 for sys_language records) is allowed to be edited by the user.
Definition at line 522 of file class.t3lib_userauthgroup.php. |
|
Sends a warning to $email if there has been a certain amount of failed logins during a period. If a login fails, this function is called. It will look up the sys_log to see if there has been more than $max failed logins the last $secondsBack seconds (default 3600). If so, an email with a warning is sent to $email.
Definition at line 1642 of file class.t3lib_userauthgroup.php. |
|
Checking if a workspace is allowed for backend user
Definition at line 1412 of file class.t3lib_userauthgroup.php. References t3lib_BEfunc::deleteClause(), and t3lib_div::inList(). Referenced by local_beUserAuth::ext_workspaceMembership(). |
|
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 1487 of file class.t3lib_userauthgroup.php. |
|
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.
Definition at line 233 of file class.t3lib_userauthgroup.php. References calcPerms(). Referenced by t3lib_tsfeBeUserAuth::extPageReadAccess(). |
|
Initializes a lot of stuff like the access-lists, database-mountpoints and filemountpoints This method is called by ->backendCheckLogin() (from extending class t3lib_beuserauth) if the backend user login has verified OK. Generally this is required initialization of a backend user.
Definition at line 1035 of file class.t3lib_userauthgroup.php. References t3lib_TSparser::checkIncludeLines_array(), t3lib_BEfunc::getHash(), t3lib_extMgm::isLoaded(), t3lib_div::makeInstance(), t3lib_BEfunc::storeHash(), and t3lib_div::uniqueList(). Referenced by t3lib_beUserAuth::backendCheckLogin(). |
|
Fetches the group records, subgroups and fills internal arrays. Function is called recursively to fetch subgroups
Definition at line 1168 of file class.t3lib_userauthgroup.php. References t3lib_div::getIndpEnv(), and t3lib_div::getUserObj(). |
|
Return default workspace ID for user
Definition at line 1538 of file class.t3lib_userauthgroup.php. References t3lib_BEfunc::deleteClause(). |
|
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 will this check read permissions.
Definition at line 328 of file class.t3lib_userauthgroup.php. References t3lib_div::callUserFunction(), and isAdmin(). Referenced by t3lib_tsfeBeUserAuth::extGetCategory_cache(), t3lib_tsfeBeUserAuth::extGetCategory_publish(), t3lib_tsfeBeUserAuth::extSaveFeAdminConfig(), isInWebMount(), and local_beUserAuth::returnWebmounts(). |
|
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!
Definition at line 909 of file class.t3lib_userauthgroup.php. |
|
Returns the "properties" of the $objectString from the BE_USERS "User TSconfig" array
Definition at line 947 of file class.t3lib_userauthgroup.php. Referenced by t3lib_beUserAuth::backendSetUC(), t3lib_tsfeBeUserAuth::extInitFeAdmin(), and t3lib_beUserAuth::overrideUC(). |
|
Returns the "value" of the $objectString from the BE_USERS "User TSconfig" array
Definition at line 935 of file class.t3lib_userauthgroup.php. Referenced by t3lib_beUserAuth::checkLockToIP(), and t3lib_tsfeBeUserAuth::extGetCategory_edit(). |
|
Returns true if $item is in $in_list
Definition at line 959 of file class.t3lib_userauthgroup.php. Referenced by isMemberOfGroup(). |
|
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 199 of file class.t3lib_userauthgroup.php. Referenced by t3lib_beUserAuth::backendCheckLogin(), t3lib_tsfeBeUserAuth::checkBackendAccessSettingsFromInitPhp(), t3lib_beUserAuth::checkCLIuser(), t3lib_beUserAuth::emailAtLogin(), local_beUserAuth::ext_printOverview(), getPagePermsClause(), isInWebMount(), and modAccess(). |
|
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
Definition at line 250 of file class.t3lib_userauthgroup.php. References t3lib_userAuth::$id, t3lib_BEfunc::BEgetRootLine(), getPagePermsClause(), isAdmin(), returnWebmounts(), and t3lib_BEfunc::typo3PrintError(). Referenced by local_beUserAuth::ext_workspaceMembership(), and t3lib_tsfeBeUserAuth::extPageReadAccess(). |
|
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.
Definition at line 211 of file class.t3lib_userauthgroup.php. References inList(). |
|
Will check a type of permission against the compiled permission integer, $lCP, and in relation to table, $table
Definition at line 619 of file class.t3lib_userauthgroup.php. |
|
Returns true if the RTE (Rich Text Editor) can be enabled for the user Strictly this is not permissions being checked but rather a series of settings like a loaded extension, browser/client type and a configuration option in ->uc[edit_RTE] The reasons for a FALSE return can be found in $this->RTE_errors
Definition at line 405 of file class.t3lib_userauthgroup.php. References t3lib_BEfunc::RTEgetObj(). |
|
Returns true or false, depending if an alert popup (a javascript confirmation) should be shown call like $GLOBALS['BE_USER']->jsConfirmation($BITMASK) 1 - typeChange 2 - copy/move/paste 4 - delete 8 - frontend editing 128 - other (not used yet)
Definition at line 997 of file class.t3lib_userauthgroup.php. |
|
Returns true if the BE_USER is allowed to *create* shortcuts in the backend modules
Definition at line 636 of file class.t3lib_userauthgroup.php. |
|
Checks access to a backend module with the $MCONF passed as first argument
Definition at line 277 of file class.t3lib_userauthgroup.php. References check(), t3lib_div::inList(), isAdmin(), t3lib_BEfunc::isModuleSetInTBE_MODULES(), and t3lib_BEfunc::typo3PrintError(). |
|
Checking if a user has editing access to a record from a $TCA table. The checks does not take page permissions and other "environmental" things into account. It only deal with record internals; If any values in the record fields disallows it. For instance languages settings, authMode selector boxes are evaluated (and maybe more in the future). It will check for workspace dependent access. The function takes an ID (integer) or row (array) as second argument.
Definition at line 544 of file class.t3lib_userauthgroup.php. References t3lib_BEfunc::getRecord(), and t3lib_div::loadTCA(). |
|
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 980 of file class.t3lib_userauthgroup.php. Referenced by local_beUserAuth::ext_printOverview(). |
|
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 970 of file class.t3lib_userauthgroup.php. Referenced by local_beUserAuth::ext_printOverview(), and isInWebMount(). |
|
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.
Definition at line 1266 of file class.t3lib_userauthgroup.php. |
|
Setting workspace ID
Definition at line 1500 of file class.t3lib_userauthgroup.php. |
|
Setting workspace preview state for user:
Definition at line 1528 of file class.t3lib_userauthgroup.php. |
|
Simple logging function
Definition at line 1621 of file class.t3lib_userauthgroup.php. |
|
Evaluates if auto creation of a version of a record is allowed.
Definition at line 752 of file class.t3lib_userauthgroup.php. References t3lib_BEfunc::getWorkspaceVersionOfRecord(), and t3lib_BEfunc::isPidInVersionizedBranch(). |
|
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!
Definition at line 712 of file class.t3lib_userauthgroup.php. References t3lib_BEfunc::isPidInVersionizedBranch(). |
|
Evaluates if a user is allowed to edit the offline version
Definition at line 689 of file class.t3lib_userauthgroup.php. References t3lib_BEfunc::getRecord(). |
|
Checking if editing of an existing record is allowed in current workspace if that is offline. Rules for editing in offline mode:
Definition at line 650 of file class.t3lib_userauthgroup.php. References t3lib_BEfunc::getRecord(). |
|
Checks if an element stage allows access for the user in the current workspace In workspaces 0 (Live) and -1 (Default draft) access is always granted for any stage. Admins are always allowed.
Definition at line 772 of file class.t3lib_userauthgroup.php. |
|
Evaluates if a record from $table can be created in $pid
Definition at line 733 of file class.t3lib_userauthgroup.php. |
|
Initializing workspace. Called from within this function, see fetchGroupData()
Definition at line 1369 of file class.t3lib_userauthgroup.php. References t3lib_div::intExplode(). |
|
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 If -1 (draft workspace) TRUE is returned if the user has access to the Live workspace For custom workspaces it depends on whether the user is owner OR like with draft workspace if the user has access to Live workspace.
Definition at line 795 of file class.t3lib_userauthgroup.php. |
|
Workspace swap-mode access?
Definition at line 823 of file class.t3lib_userauthgroup.php. |
|
Workspace Versioning type access?
Definition at line 835 of file class.t3lib_userauthgroup.php. References t3lib_div::intInRange(). |
|
Finding "closest" versioning type, used for creation of new records.
Definition at line 866 of file class.t3lib_userauthgroup.php. References t3lib_div::intInRange(). |
|
Writes an entry in the logfile/table Documentation in "TYPO3 Core API"
Definition at line 1589 of file class.t3lib_userauthgroup.php. References t3lib_div::getIndpEnv(). |
|
Initial value: array( // Used internally to accumulate data for the user-group. DONT USE THIS EXTERNALLY! Use $this->groupData instead
'webmount_list'=>'',
'filemount_list'=>'',
'modList'=>'',
'tables_select'=>'',
'tables_modify'=>'',
'pagetypes_select'=>'',
'non_exclude_fields'=>'',
'explicit_allowdeny'=>'',
'allowed_languages' => '',
'workspace_perms' => '',
'custom_options' => '',
)
Definition at line 149 of file class.t3lib_userauthgroup.php. |
|
Initial value: Array( // This array holds lists of eg. tables, fields and other values related to the permission-system. See fetchGroupData 'filemounts' => Array() // Filemounts are loaded here ) Definition at line 140 of file class.t3lib_userauthgroup.php. |