From f34e6d897766ab93a0c0dede9d89f5536c4f60e9 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 27 Feb 2018 19:15:12 -0800 Subject: move oauth_client management and guest access tokens to features rather than auto-enabling at various feature levels. This involves string changes and should *not* go into 3.2RC. --- Zotlabs/Widget/Settings_menu.php | 4 +-- include/features.php | 59 +++++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/Zotlabs/Widget/Settings_menu.php b/Zotlabs/Widget/Settings_menu.php index e15ed96a5..20241a22f 100644 --- a/Zotlabs/Widget/Settings_menu.php +++ b/Zotlabs/Widget/Settings_menu.php @@ -79,7 +79,7 @@ class Settings_menu { 'selected' => '' ); - if(get_account_techlevel() > 0) { + if(feature_enabled(local_channel(),'oauth_clients')) { $tabs[] = array( 'label' => t('Connected apps'), 'url' => z_root() . '/settings/oauth', @@ -87,7 +87,7 @@ class Settings_menu { ); } - if(get_account_techlevel() > 2) { + if(feature_enabled(local_channel(),'access_tokens')) { $tabs[] = array( 'label' => t('Guest Access Tokens'), 'url' => z_root() . '/settings/tokens', diff --git a/include/features.php b/include/features.php index 839faff67..be4017776 100644 --- a/include/features.php +++ b/include/features.php @@ -54,14 +54,6 @@ function get_features($filtered = true) { t('General Features'), - [ - 'multi_profiles', - t('Multiple Profiles'), - t('Ability to create multiple profiles'), - false, - get_config('feature_lock','multi_profiles'), - feature_level('multi_profiles',3), - ], [ 'advanced_profiles', @@ -163,14 +155,6 @@ function get_features($filtered = true) { feature_level('ajaxchat',1), ], - [ - 'permcats', - t('Permission Groups'), - t('Provide alternate connection permission roles.'), - false, - get_config('feature_lock','permcats'), - feature_level('permcats',2), - ], [ 'smart_birthdays', @@ -219,6 +203,49 @@ function get_features($filtered = true) { ], ], + + 'access_control' => [ + t('Access Control and Permissions'), + + [ + 'multi_profiles', + t('Multiple Profiles'), + t('Ability to create multiple profiles'), + false, + get_config('feature_lock','multi_profiles'), + feature_level('multi_profiles',3), + ], + + + [ + 'permcats', + t('Permission Groups'), + t('Provide alternate connection permission roles.'), + false, + get_config('feature_lock','permcats'), + feature_level('permcats',2), + ], + + [ + 'oauth_clients', + t('OAuth Clients'), + t('Manage authenticatication tokens for mobile and remote apps.'), + false, + get_config('feature_lock','oauth_clients'), + feature_level('oauth_clients',1), + ], + + [ + 'access_tokens', + t('Access Tokens'), + t('Create access tokens so that non-members can access private content.'), + false, + get_config('feature_lock','access_tokens'), + feature_level('access_tokens',2), + ], + + ], + // Post composition 'composition' => [ -- cgit v1.2.3 From 14183b8fb548b6525d6ce98b52ce5ec7f2580f2e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 27 Feb 2018 19:18:53 -0800 Subject: move privacy groups to the newly created Access Control and Permissions tab. Not for 3.2 as it requires string changes from the prior checkin. --- include/features.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/features.php b/include/features.php index be4017776..993266977 100644 --- a/include/features.php +++ b/include/features.php @@ -207,6 +207,15 @@ function get_features($filtered = true) { 'access_control' => [ t('Access Control and Permissions'), + [ + 'groups', + t('Privacy Groups'), + t('Enable management and selection of privacy groups'), + true, + get_config('feature_lock','groups'), + feature_level('groups',0), + ], + [ 'multi_profiles', t('Multiple Profiles'), @@ -339,14 +348,6 @@ function get_features($filtered = true) { feature_level('archives',1), ], - [ - 'groups', - t('Privacy Groups'), - t('Enable management and selection of privacy groups'), - true, - get_config('feature_lock','groups'), - feature_level('groups',0), - ], [ 'savedsearch', -- cgit v1.2.3 From be5187718c0f1791a692b7743aca51ea5f37649e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 27 Feb 2018 19:34:51 -0800 Subject: provide usage hint on addon settings page to save each panel before opening another. [String change, not for 3.2] --- Zotlabs/Module/Settings/Featured.php | 1 + view/tpl/settings_addons.tpl | 1 + 2 files changed, 2 insertions(+) diff --git a/Zotlabs/Module/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php index 9c5a7b16c..3740eddfa 100644 --- a/Zotlabs/Module/Settings/Featured.php +++ b/Zotlabs/Module/Settings/Featured.php @@ -62,6 +62,7 @@ class Featured { $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_featured"), '$title' => t('Feature/Addon Settings'), + '$descrip' => t('Please save/submit changes to any panel before opening another.'), '$settings_addons' => $settings_addons )); return $o; diff --git a/view/tpl/settings_addons.tpl b/view/tpl/settings_addons.tpl index 52f8d9d3f..2a925f1f7 100755 --- a/view/tpl/settings_addons.tpl +++ b/view/tpl/settings_addons.tpl @@ -1,5 +1,6 @@
+
{{$descrip}}

{{$title}}

-- cgit v1.2.3 From 6c60be9e8d57c26e92f704de0712def767ab8705 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 27 Feb 2018 19:51:29 -0800 Subject: rename Addon/Feature settings to addon settings [string change] --- Zotlabs/Module/Settings/Featured.php | 2 +- Zotlabs/Widget/Settings_menu.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php index 3740eddfa..1da139206 100644 --- a/Zotlabs/Module/Settings/Featured.php +++ b/Zotlabs/Module/Settings/Featured.php @@ -61,7 +61,7 @@ class Featured { $tpl = get_markup_template("settings_addons.tpl"); $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_featured"), - '$title' => t('Feature/Addon Settings'), + '$title' => t('Addon Settings'), '$descrip' => t('Please save/submit changes to any panel before opening another.'), '$settings_addons' => $settings_addons )); diff --git a/Zotlabs/Widget/Settings_menu.php b/Zotlabs/Widget/Settings_menu.php index 20241a22f..455fdcb9b 100644 --- a/Zotlabs/Widget/Settings_menu.php +++ b/Zotlabs/Widget/Settings_menu.php @@ -54,7 +54,7 @@ class Settings_menu { } $tabs[] = array( - 'label' => t('Feature/Addon settings'), + 'label' => t('Addon settings'), 'url' => z_root().'/settings/featured', 'selected' => ((argv(1) === 'featured') ? 'active' : ''), ); -- cgit v1.2.3