The Hubzilla
 All Classes Namespaces Files Functions Variables Pages
permissions.php File Reference

Functions

 get_all_perms ($uid, $observer_xchan, $internal_use=true)
 
 perm_is_allowed ($uid, $observer_xchan, $permission)
 Checks if given permission is allowed for given observer on a channel. More...
 
 get_all_api_perms ($uid, $api)
 
 api_perm_is_allowed ($uid, $api, $permission)
 
 check_list_permissions ($uid, $arr, $perm)
 
 site_default_perms ()
 Sets site wide default permissions. More...
 

Detailed Description

This file conntains functions to check and work with permissions.

Function Documentation

api_perm_is_allowed (   $uid,
  $api,
  $permission 
)

Referenced by perm_is_allowed().

check_list_permissions (   $uid,
  $arr,
  $perm 
)
get_all_api_perms (   $uid,
  $api 
)

Referenced by get_all_perms().

get_all_perms (   $uid,
  $observer_xchan,
  $internal_use = true 
)

get_all_perms($uid,$observer_xchan)

Parameters
int$uidThe channel_id associated with the resource owner
string$observer_xchanThe xchan_hash representing the observer
bool$internal_use(default true)
Returns
array of all permissions, key is permission name, value is true or false

Referenced by api_zot_perm_allowed(), change_channel(), channel_apps(), Zotlabs\Module\Achievements\get(), Zotlabs\Module\Like\get(), Zotlabs\Module\Editlayout\get(), Zotlabs\Module\Layouts\get(), Zotlabs\Module\Editwebpage\get(), Zotlabs\Module\Webpages\get(), Zotlabs\Module\Blocks\get(), Zotlabs\Module\Filestorage\get(), Zotlabs\Module\Channel\get(), Zotlabs\Module\Settings\Tokens\get(), Zotlabs\Module\Defperms\get(), Zotlabs\Module\Connedit\get(), zot_refresh(), and zotinfo().

perm_is_allowed (   $uid,
  $observer_xchan,
  $permission 
)

Checks if given permission is allowed for given observer on a channel.

Checks if the given observer with the hash $observer_xchan has permission $permission on channel_id $uid.

Parameters
int$uidThe channel_id associated with the resource owner
string$observer_xchanThe xchan_hash representing the observer
string$permission
Returns
bool true if permission is allowed for observer on channel

Referenced by Zotlabs\Lib\ThreadStream\add_thread(), advanced_profile(), api_zot_perm_allowed(), article_tagadelic(), attach_by_hash(), attach_by_hash_nodata(), attach_can_view_folder(), attach_count_files(), attach_list_files(), attach_mkdir(), attach_mkdirp(), attach_store(), card_tagadelic(), check_list_permissions(), common_friends_visitor_widget(), consume_feed(), contact_block(), Zotlabs\Widget\Wiki_pages\create_missing_page(), Zotlabs\Module\Embedphotos\embedphotos_widget_album(), Zotlabs\Module\Article_edit\get(), Zotlabs\Module\Card_edit\get(), Zotlabs\Module\Subthread\get(), Zotlabs\Module\Like\get(), Zotlabs\Module\Search\get(), Zotlabs\Module\Display\get(), Zotlabs\Module\Viewconnections\get(), Zotlabs\Module\Block\get(), Zotlabs\Module\Articles\get(), Zotlabs\Module\Cards\get(), Zotlabs\Module\Common\get(), Zotlabs\Module\Editblock\get(), Zotlabs\Module\Editlayout\get(), Zotlabs\Module\Editwebpage\get(), Zotlabs\Module\Wiki\get(), Zotlabs\Module\Cal\get(), Zotlabs\Module\Profile\get(), Zotlabs\Module\Chat\get(), Zotlabs\Module\Photos\get(), Zotlabs\Lib\ThreadItem\get_comment_box(), get_feed_for(), Zotlabs\Lib\NativeWiki\get_permissions(), Zotlabs\Module\Magic\init(), Zotlabs\Module\Page\init(), Zotlabs\Module\Photo\init(), Zotlabs\Module\Chatsvc\init(), Zotlabs\Module\Acl\init(), local_dir_update(), Zotlabs\Module\Oep\oep_album_reply(), 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\Module\Oep\oep_photo_reply(), Zotlabs\Module\Oep\oep_phototop_reply(), owt_init(), photo_upload(), photos_album_widget(), photos_albums_list(), photos_list_photos(), poco(), Zotlabs\Module\Item\post(), Zotlabs\Module\Photos\post(), post_activity_item(), process_delivery(), process_mail_delivery(), profile_load(), profile_sidebar(), public_recips(), Zotlabs\Lib\ThreadStream\set_mode(), tag_deliver(), tagadelic(), tgroup_check(), update_birthdays(), Zotlabs\Zot\Auth\Verify(), Zotlabs\Widget\Tagcloud_wall\widget(), Zotlabs\Widget\Catcloud_wall\widget(), Zotlabs\Widget\Archive\widget(), Zotlabs\Widget\Item\widget(), Zotlabs\Widget\Album\widget(), Zotlabs\Widget\Common_friends\widget(), Zotlabs\Widget\Portfolio\widget(), Zotlabs\Widget\Categories\widget(), Zotlabs\Widget\Photo_albums\widget(), Zotlabs\Widget\Wiki_pages\widget(), z_readdir(), zot_feed(), and zot_reply_auth_check().

site_default_perms ( )

Sets site wide default permissions.

Returns
array

Referenced by create_identity().