From aea61bf03468d9cda1abff414e7118662a6acd06 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 19 Apr 2018 19:05:13 -0700 Subject: rename social - party to social - federation. Cleanup some of the documentation surrounding channels. This checkin contains translatable string changes. --- Zotlabs/Access/PermissionRoles.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Access') diff --git a/Zotlabs/Access/PermissionRoles.php b/Zotlabs/Access/PermissionRoles.php index a8a9ae462..9855a05c4 100644 --- a/Zotlabs/Access/PermissionRoles.php +++ b/Zotlabs/Access/PermissionRoles.php @@ -41,7 +41,7 @@ class PermissionRoles { break; - case 'social_party': + case 'social_federation': $ret['perms_auto'] = false; $ret['default_collection'] = false; $ret['directory_publish'] = true; @@ -281,7 +281,7 @@ class PermissionRoles { static public function roles() { $roles = [ t('Social Networking') => [ - 'social_party' => t('Social - Party'), + 'social_federation' => t('Social - Federation'), 'social' => t('Social - Mostly Public'), 'social_restricted' => t('Social - Restricted'), 'social_private' => t('Social - Private') -- cgit v1.2.3 From d5c451c4a8e6e21554d69f35ad77a85281f3d2be Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 19 Apr 2018 23:44:22 -0700 Subject: This fix needs to go deeper in the code. PermissionLimits::Get is called in a lot of places. If we have no stored setting for a particular permission, return 0 - which is basically no permission except to self. --- Zotlabs/Access/PermissionLimits.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Access') diff --git a/Zotlabs/Access/PermissionLimits.php b/Zotlabs/Access/PermissionLimits.php index 1d15098fc..e0ee88367 100644 --- a/Zotlabs/Access/PermissionLimits.php +++ b/Zotlabs/Access/PermissionLimits.php @@ -74,13 +74,13 @@ class PermissionLimits { * @param int $channel_id * @param string $perm (optional) * @return - * * \b boolean false if no perm_limits set for this channel - * * \b int if $perm is set, return one of PERMS_* constants for this permission + * * \b false if no perm_limits set for this channel + * * \b int if $perm is set, return one of PERMS_* constants for this permission, default 0 * * \b array with all permission limits, if $perm is not set */ static public function Get($channel_id, $perm = '') { if($perm) { - return PConfig::Get($channel_id, 'perm_limits', $perm); + return intval(PConfig::Get($channel_id, 'perm_limits', $perm)); } PConfig::Load($channel_id); -- cgit v1.2.3 From e05f41630bd7d4fa2b7cae7ea400bc04c1cc8afd Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 20 Apr 2018 14:38:15 -0700 Subject: anonymous comments shouldn't be allowed in StdLimits --- Zotlabs/Access/PermissionLimits.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Zotlabs/Access') diff --git a/Zotlabs/Access/PermissionLimits.php b/Zotlabs/Access/PermissionLimits.php index e0ee88367..c11dc95e6 100644 --- a/Zotlabs/Access/PermissionLimits.php +++ b/Zotlabs/Access/PermissionLimits.php @@ -41,10 +41,8 @@ class PermissionLimits { $limits = []; $perms = Permissions::Perms(); - $anon_comments = get_config('system','anonymous_comments',true); - foreach($perms as $k => $v) { - if(strstr($k, 'view') || ($k === 'post_comments' && $anon_comments)) + if(strstr($k, 'view')) $limits[$k] = PERMS_PUBLIC; else $limits[$k] = PERMS_SPECIFIC; -- cgit v1.2.3