diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/permissions.php | 4 | ||||
-rw-r--r-- | include/widgets.php | 13 |
2 files changed, 12 insertions, 5 deletions
diff --git a/include/permissions.php b/include/permissions.php index 61ac8aea3..4eead563f 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -734,6 +734,10 @@ function get_role_perms($role) { function role_selector($current) { + + if(! $current) + $current = 'custom'; + $roles = array( 'social' => array( t('Social Networking'), array('social' => t('Mostly Public'), 'social_restricted' => t('Restricted'), 'social_private' => t('Private'))), diff --git a/include/widgets.php b/include/widgets.php index 8905df59a..2e406aa77 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -430,6 +430,8 @@ function widget_settings_menu($arr) { // Retrieve the 'self' address book entry for use in the auto-permissions link + $role = get_pconfig(local_user(),'system','permissions_role'); + $abk = q("select abook_id from abook where abook_channel = %d and ( abook_flags & %d ) limit 1", intval(local_user()), intval(ABOOK_FLAG_SELF) @@ -487,14 +489,15 @@ function widget_settings_menu($arr) { 'selected' => '' ), - array( + ); + + if($role === false || $role === 'custom') { + $tabs[] = array( 'label' => t('Automatic Permissions (Advanced)'), 'url' => $a->get_baseurl(true) . '/connedit/' . $abook_self_id, 'selected' => '' - ), - - - ); + ); + } if(feature_enabled(local_user(),'premium_channel')) { $tabs[] = array( |