aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-27 19:15:12 -0800
committerzotlabs <mike@macgirvin.com>2018-02-27 19:15:12 -0800
commitf34e6d897766ab93a0c0dede9d89f5536c4f60e9 (patch)
tree0f622bcbabfeb814bcce86f51fad9c89db6b7f4c
parent68c6d7a099e8615a135b75464e308c719bd9b0fe (diff)
downloadvolse-hubzilla-f34e6d897766ab93a0c0dede9d89f5536c4f60e9.tar.gz
volse-hubzilla-f34e6d897766ab93a0c0dede9d89f5536c4f60e9.tar.bz2
volse-hubzilla-f34e6d897766ab93a0c0dede9d89f5536c4f60e9.zip
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.
-rw-r--r--Zotlabs/Widget/Settings_menu.php4
-rw-r--r--include/features.php59
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' => [