aboutsummaryrefslogtreecommitdiffstats
path: root/include/features.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/features.php')
-rw-r--r--include/features.php26
1 files changed, 22 insertions, 4 deletions
diff --git a/include/features.php b/include/features.php
index 5481c37a4..c865f6754 100644
--- a/include/features.php
+++ b/include/features.php
@@ -44,7 +44,7 @@ function feature_level($feature,$def) {
return $def;
}
-function get_features($filtered = true) {
+function get_features($filtered = true, $level = (-1)) {
$account = \App::get_account();
@@ -246,14 +246,23 @@ function get_features($filtered = true) {
[
'oauth_clients',
- t('OAuth Clients'),
- t('Manage authenticatication tokens for mobile and remote apps.'),
+ t('OAuth1 Clients'),
+ t('Manage OAuth1 authenticatication tokens for mobile and remote apps.'),
false,
get_config('feature_lock','oauth_clients'),
feature_level('oauth_clients',1),
],
[
+ 'oauth2_clients',
+ t('OAuth2 Clients'),
+ t('Manage OAuth2 authenticatication tokens for mobile and remote apps.'),
+ false,
+ get_config('feature_lock','oauth2_clients'),
+ feature_level('oauth2_clients',1),
+ ],
+
+ [
'access_tokens',
t('Access Tokens'),
t('Create access tokens so that non-members can access private content.'),
@@ -341,6 +350,15 @@ function get_features($filtered = true) {
feature_level('suppress_duplicates',1),
],
+ [
+ 'auto_save_draft',
+ t('Auto-save drafts of posts and comments'),
+ t('Automatically saves post and comment drafts in local browser storage to help prevent accidental loss of compositions'),
+ true,
+ get_config('feature_lock','auto_save_draft'),
+ feature_level('auto_save_draft',1),
+ ],
+
],
// Network Tools
@@ -490,7 +508,7 @@ function get_features($filtered = true) {
$arr = $x['features'];
- $techlevel = get_account_techlevel();
+ $techlevel = (($level >= 0) ? $level : get_account_techlevel());
// removed any locked features and remove the entire category if this makes it empty