Public Member Functions | |
getUserInfoFromCookieOrSession () | |
return user info from cookie or session | |
checkRights ($wiki) | |
return a user from session variables (user is logged) or anonymous user | |
isIPInNet ($ip, $network, $mask) | |
check if an ip is in a network/mask | |
isIpInNetArray ($ip, $network_array) | |
check if an ip is in a list of network/mask | |
collectIpsFromString (&$ips, $str) | |
parse a comma separated list of ips and add it to ips | |
filterOutPrivateIps ($ips) | |
return a list of filtered IP (private ips are taken out) | |
getIPs ($filter_out_private_ips=false) | |
return list of IP from currently connected browser | |
generateRandomText ($textLen) | |
randomly generates a text | |
aclMatch ($default_global_action, $acl_type, $user, $node) | |
is it possible for this user to do an action on this node based on acls and an acl_type | |
canEdit ($user, $node) | |
is it possible for this user to edit this node | |
canRead ($user, $node) | |
is it possible for this user to read this node | |
canComment ($user, $node) | |
is it possible for this user to comment | |
banned () | |
look into the table of banned ip and returns true if ip of current user was banned |
auth::aclMatch | ( | $ | default_global_action, | |
$ | acl_type, | |||
$ | user, | |||
$ | node | |||
) |
is it possible for this user to do an action on this node based on acls and an acl_type
default_global_action | the default parameter for the whole wiki | |
acl_type | the acl_type to check | |
user | the user to check | |
node | the node to check ACL |
auth::banned | ( | ) |
look into the table of banned ip and returns true if ip of current user was banned
auth::canComment | ( | $ | user, | |
$ | node | |||
) |
is it possible for this user to comment
user | the user to check | |
node | the node to check ACL |
auth::canEdit | ( | $ | user, | |
$ | node | |||
) |
is it possible for this user to edit this node
user | the user to check | |
node | the node to check ACL |
auth::canRead | ( | $ | user, | |
$ | node | |||
) |
is it possible for this user to read this node
user | the user to check | |
node | the node to check ACL |
auth::checkRights | ( | $ | wiki | ) |
return a user from session variables (user is logged) or anonymous user
wiki | the wiki controller object |
auth::collectIpsFromString | ( | &$ | ips, | |
$ | str | |||
) |
parse a comma separated list of ips and add it to ips
ips | the array of ip to complete | |
str | the string to parse |
auth::filterOutPrivateIps | ( | $ | ips | ) |
return a list of filtered IP (private ips are taken out)
ips | ips to filter |
auth::generateRandomText | ( | $ | textLen | ) |
randomly generates a text
$textLen | length of text |
auth::getIPs | ( | $ | filter_out_private_ips = false |
) |
return list of IP from currently connected browser
$filter_out_private_ips | indicates if we need to filter out private ips |
auth::getUserInfoFromCookieOrSession | ( | ) |
return user info from cookie or session
auth::isIPInNet | ( | $ | ip, | |
$ | network, | |||
$ | mask | |||
) |
check if an ip is in a network/mask
ip | the ip to check | |
network | the network to compare against | |
mask | the mask to apply on network for comparison |
auth::isIpInNetArray | ( | $ | ip, | |
$ | network_array | |||
) |
check if an ip is in a list of network/mask
ip | the ip to check | |
network_array | a list of network/mask |