The Hubzilla
|
Some security related functions. More...
Functions | |
authenticate_success ($user_record, $channel=null, $login_initial=false, $interactive=false, $return=false, $update_lastlog=false) | |
atoken_login ($atoken) | |
atoken_xchan ($atoken) | |
atoken_delete ($atoken_id) | |
atoken_create_xchan ($xchan) | |
In order for atoken logins to create content (such as posts) they need a stored xchan. we'll create one on the first atoken_login; it can't really ever go away but perhaps. More... | |
atoken_abook ($uid, $xchan_hash) | |
pseudo_abook ($xchan) | |
change_channel ($change_channel) | |
Change to another channel with current logged-in account. More... | |
permissions_sql ($owner_id, $remote_observer=null, $table= '') | |
Creates an additional SQL where statement to check permissions. More... | |
item_permissions_sql ($owner_id, $remote_observer=null) | |
Creates an addiontal SQL where statement to check permissions for an item. More... | |
scopes_sql ($uid, $observer) | |
public_permissions_sql ($observer_hash) | |
get_form_security_token ($typename= '') | |
check_form_security_token ($typename= '', $formname= 'form_security_token') | |
check_form_security_std_err_msg () | |
check_form_security_token_redirectOnErr ($err_redirect, $typename= '', $formname= 'form_security_token') | |
check_form_security_token_ForbiddenOnErr ($typename= '', $formname= 'form_security_token') | |
init_groups_visitor ($contact_id) | |
stream_perms_api_uids ($perms=NULL, $limit=0, $rand=0) | |
stream_perms_xchans ($perms=NULL) | |
Some security related functions.
atoken_abook | ( | $uid, | |
$xchan_hash | |||
) |
Referenced by get_all_perms(), and perm_is_allowed().
atoken_create_xchan | ( | $xchan | ) |
In order for atoken logins to create content (such as posts) they need a stored xchan. we'll create one on the first atoken_login; it can't really ever go away but perhaps.
array | $xchan |
Referenced by account_verify_password().
atoken_delete | ( | $atoken_id | ) |
Referenced by Zotlabs\Module\Settings\Tokens\get(), and Zotlabs\Daemon\Cron\run().
atoken_login | ( | $atoken | ) |
Referenced by zat_init().
atoken_xchan | ( | $atoken | ) |
array | $atoken |
Referenced by account_verify_password(), atoken_abook(), Zotlabs\Module\Lockview\get(), Zotlabs\Module\Acl\init(), and zat_init().
authenticate_success | ( | $user_record, | |
$channel = null , |
|||
$login_initial = false , |
|||
$interactive = false , |
|||
$return = false , |
|||
$update_lastlog = false |
|||
) |
int | $user_record | The account_id |
array | $channel | |
bool | $login_initial | default false |
bool | $interactive | default false |
bool | $return | |
bool | $update_lastlog |
Referenced by account_approve(), api_login(), Zotlabs\Module\Cdav\init(), Zotlabs\Module\Dav\init(), ZotOAuth1\loginUser(), and Zotlabs\Module\Register\post().
change_channel | ( | $change_channel | ) |
Change to another channel with current logged-in account.
int | $change_channel | The channel_id of the channel you want to change to |
Referenced by api_login(), api_user(), authenticate_success(), Zotlabs\Module\Manage\get(), Zotlabs\Module\Rpost\get(), Zotlabs\Module\Import\import_account(), Zotlabs\Module\Magic\init(), Zotlabs\Module\Cdav\init(), Zotlabs\Module\Dav\init(), owt_init(), Zotlabs\Module\Register\post(), Zotlabs\Module\New_channel\post(), and Zotlabs\Zot\Auth\Verify().
check_form_security_std_err_msg | ( | ) |
Referenced by check_form_security_token_redirectOnErr().
check_form_security_token | ( | $typename = '' , |
|
$formname = 'form_security_token' |
|||
) |
Referenced by check_form_security_token_ForbiddenOnErr(), and check_form_security_token_redirectOnErr().
check_form_security_token_ForbiddenOnErr | ( | $typename = '' , |
|
$formname = 'form_security_token' |
|||
) |
Referenced by Zotlabs\Module\Group\get().
check_form_security_token_redirectOnErr | ( | $err_redirect, | |
$typename = '' , |
|||
$formname = 'form_security_token' |
|||
) |
Referenced by Zotlabs\Module\Admin\Themes\get(), Zotlabs\Module\Admin\Channels\get(), Zotlabs\Module\Group\get(), Zotlabs\Module\Admin\Accounts\get(), Zotlabs\Module\Settings\Oauth\get(), Zotlabs\Module\Admin\Plugins\get(), Zotlabs\Module\Profiles\init(), Zotlabs\Module\Settings\Account\post(), Zotlabs\Module\Admin\Security\post(), Zotlabs\Module\Settings\Featured\post(), Zotlabs\Module\Settings\Features\post(), Zotlabs\Module\Settings\Oauth\post(), Zotlabs\Module\Settings\Permcats\post(), Zotlabs\Module\Settings\Tokens\post(), Zotlabs\Module\Group\post(), Zotlabs\Module\Pconfig\post(), Zotlabs\Module\Admin\Features\post(), Zotlabs\Module\Settings\Channel\post(), Zotlabs\Module\Admin\Site\post(), Zotlabs\Module\Settings\Display\post(), Zotlabs\Module\Import_items\post(), Zotlabs\Module\Invite\post(), Zotlabs\Module\Admin\Logs\post(), Zotlabs\Module\Admin\Channels\post(), Zotlabs\Module\Admin\Accounts\post(), Zotlabs\Module\Cover_photo\post(), Zotlabs\Module\Profile_photo\post(), Zotlabs\Module\Profiles\post(), and Zotlabs\Module\Import\post().
get_form_security_token | ( | $typename = '' | ) |
Referenced by Zotlabs\Module\Settings\Features\get(), Zotlabs\Module\Settings\Featured\get(), Zotlabs\Module\Admin\Logs\get(), Zotlabs\Module\Admin\Themes\get(), Zotlabs\Module\Admin\Features\get(), Zotlabs\Module\Settings\Permcats\get(), Zotlabs\Module\Admin\Security\get(), Zotlabs\Module\Admin\Channels\get(), Zotlabs\Module\Group\get(), Zotlabs\Module\Admin\Accounts\get(), Zotlabs\Module\Settings\Oauth\get(), Zotlabs\Module\Settings\Tokens\get(), Zotlabs\Module\Invite\get(), Zotlabs\Module\Settings\Account\get(), Zotlabs\Module\Settings\Display\get(), Zotlabs\Module\Import_items\get(), Zotlabs\Module\Admin\Site\get(), Zotlabs\Module\Admin\Plugins\get(), Zotlabs\Module\Cover_photo\get(), Zotlabs\Module\Profile_photo\get(), Zotlabs\Module\Settings\Channel\get(), Zotlabs\Module\Import\get(), Zotlabs\Module\Profiles\get(), and Zotlabs\Module\Pconfig\pconfig_form().
init_groups_visitor | ( | $contact_id | ) |
Referenced by item_permissions_sql(), owt_init(), permissions_sql(), public_permissions_sql(), and Zotlabs\Zot\Auth\Verify().
item_permissions_sql | ( | $owner_id, | |
$remote_observer = null |
|||
) |
Creates an addiontal SQL where statement to check permissions for an item.
int | $owner_id | |
bool | $remote_observer | (optional) use current observer if unset |
Construct permissions
default permissions - anonymous user
Profile owner - everything is visible
Authenticated visitor. Unless pre-verified, check that the contact belongs to this $owner_id and load the groups the visitor belongs to. If pre-verified, the caller is expected to have already done this and passed the groups into this function.
Referenced by article_tagadelic(), articlecategories_widget(), card_tagadelic(), cardcategories_widget(), categories_widget(), channel_apps(), Zotlabs\Lib\NativeWiki\exists_by_name(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Block\get(), Zotlabs\Module\Articles\get(), Zotlabs\Module\Cards\get(), Zotlabs\Module\Editwebpage\get(), Zotlabs\Module\Webpages\get(), Zotlabs\Module\Rpost\get(), Zotlabs\Module\Hq\get(), Zotlabs\Module\Channel\get(), Zotlabs\Module\Photos\get(), Zotlabs\Lib\NativeWiki\get_permissions(), get_webpage_elements(), Zotlabs\Lib\NativeWiki\get_wiki(), Zotlabs\Module\Share\init(), Zotlabs\Module\Page\init(), items_fetch(), Zotlabs\Lib\NativeWiki\listwikis(), Zotlabs\Lib\NativeWikiPage\load_page(), Zotlabs\Lib\NativeWikiPage\load_page_history(), Zotlabs\Module\Oep\oep_articles_reply(), Zotlabs\Module\Oep\oep_cards_reply(), Zotlabs\Module\Oep\oep_display_reply(), Zotlabs\Module\Oep\oep_mid_reply(), Zotlabs\Lib\NativeWikiPage\page_list(), pdl_selector(), tagadelic(), Zotlabs\Widget\Activity\widget(), Zotlabs\Widget\Forums\widget(), Zotlabs\Widget\Random_block\widget(), Zotlabs\Widget\Item\widget(), and zot_feed().
permissions_sql | ( | $owner_id, | |
$remote_observer = null , |
|||
$table = '' |
|||
) |
Creates an additional SQL where statement to check permissions.
int | $owner_id | |
bool | $remote_observer | (optional) use current observer if unset |
$table | (optional) |
Construct permissions
default permissions - anonymous user
Profile owner - everything is visible
Authenticated visitor. Unless pre-verified, check that the contact belongs to this $owner_id and load the groups the visitor belongs to. If pre-verified, the caller is expected to have already done this and passed the groups into this function.
Referenced by attach_by_hash(), attach_by_hash_nodata(), attach_can_view_folder(), attach_count_files(), attach_list_files(), attach_mkdir(), Zotlabs\Module\Embedphotos\embedphotos_widget_album(), Zotlabs\Lib\Chatroom\enter(), Zotlabs\Module\Cal\get(), Zotlabs\Module\Chatsvc\get(), Zotlabs\Module\Chat\get(), Zotlabs\Module\Thing\get(), Zotlabs\Module\Events\get(), Zotlabs\Module\Photos\get(), Zotlabs\Module\Photo\init(), Zotlabs\Lib\Chatroom\list_count(), menu_fetch(), Zotlabs\Lib\Chatroom\message(), Zotlabs\Module\Oep\oep_album_reply(), Zotlabs\Module\Oep\oep_photo_reply(), Zotlabs\Module\Oep\oep_phototop_reply(), photos_album_exists(), photos_albums_list(), photos_list_photos(), Zotlabs\Module\Chatsvc\post(), Zotlabs\Lib\Chatroom\roomlist(), Zotlabs\Widget\Portfolio\widget(), Zotlabs\Widget\Album\widget(), and z_readdir().
pseudo_abook | ( | $xchan | ) |
Referenced by get_all_perms(), and perm_is_allowed().
public_permissions_sql | ( | $observer_hash | ) |
string | $observer_hash |
Referenced by Zotlabs\Module\Display\get(), and Zotlabs\Module\Search\get().
scopes_sql | ( | $uid, | |
$observer | |||
) |
Remote visitors also need to be checked against the public_scope parameter if item_private is set. This function checks the various permutations of that field for any which apply to this observer.
Referenced by item_permissions_sql().
stream_perms_api_uids | ( | $perms = NULL , |
|
$limit = 0 , |
|||
$rand = 0 |
|||
) |
Referenced by Zotlabs\Module\Pubstream\get(), and Zotlabs\Module\Display\get().
stream_perms_xchans | ( | $perms = NULL | ) |
Referenced by Zotlabs\Module\Search\get().