Skip to content

Commit e3147be

Browse files
feat(config): expose allow_subadmins via OWNCLOUD_ALLOW_SUBADMINS (#494)
* feat(config): expose allow_subadmins via OWNCLOUD_ALLOW_SUBADMINS ownCloud core (oC 11) disables the subadmin/group-admin feature by default via the new allow_subadmins config setting. Expose it through the OWNCLOUD_ALLOW_SUBADMINS environment variable so operators can opt the feature back in without bind-mounting a custom config. This is an ownCloud 11 only setting, so the change applies to v24.04 only; v20.04 and v22.04 are intentionally left unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> * docs: clarify OWNCLOUD_ALLOW_SUBADMINS usage and deep-link docs Address review feedback on PR #494: state that only the literal value `true` enables the feature and that leaving it unset keeps it disabled (ownCloud core default), and deep-link to the specific config sample parameter section like the neighbouring entries. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --------- Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6e57637 commit e3147be

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

ENVIRONMENT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
ownCloud admin password.
1919
- `OWNCLOUD_ADMIN_USERNAME=admin` \
2020
ownCloud admin username.
21+
- `OWNCLOUD_ALLOW_SUBADMINS=` \
22+
Enable or disable the subadmin (group admin) feature. Set to `true` to enable; unset leaves it disabled (ownCloud core default) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#allow-or-disallow-the-group-administrator-subadmin-feature)).
2123
- `OWNCLOUD_ALLOW_USER_TO_CHANGE_DISPLAY_NAME=` \
2224
Allow or disallow users to change their display names (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#allow-or-disallow-users-to-change-their-display-names)).
2325
- `OWNCLOUD_ALLOW_USER_TO_CHANGE_MAIL_ADDRESS=` \

v24.04/overlay/etc/templates/config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ function getConfigFromEnv() {
8282
$config['allow_user_to_change_mail_address'] = getenv('OWNCLOUD_ALLOW_USER_TO_CHANGE_MAIL_ADDRESS') === 'true';
8383
}
8484

85+
if (getenv('OWNCLOUD_ALLOW_SUBADMINS') != '') {
86+
$config['allow_subadmins'] = getenv('OWNCLOUD_ALLOW_SUBADMINS') === 'true';
87+
}
88+
8589
if (getenv('OWNCLOUD_STRICT_LOGIN_ENFORCED') != '') {
8690
$config['strict_login_enforced'] = getenv('OWNCLOUD_STRICT_LOGIN_ENFORCED') === 'true';
8791
}

0 commit comments

Comments
 (0)