You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(subadmin): disable group-admin feature by default behind allow_subadmins
The subadmin (group-admin) feature lets an admin delegate user management
of specific groups to a non-admin user. The related code path has known
security shortcomings, so the feature is now disabled by default as a
risk-mitigation. Deployments that rely on it can opt back in by setting
the new `allow_subadmins` system config to true.
Enforcement is centralized in the OC\SubAdmin manager, the single chokepoint
all consumers route through:
- isSubAdmin() keeps the real-admin short-circuit, then returns false for
group-admin-only users when disabled, cascading to permission bypasses,
legacy guards and the settings middleware.
- Read methods (isSubAdminofGroup, getSubAdminsGroups, getGroupsSubAdmins,
getAllSubAdmins) behave as if no subadmins exist.
- createSubAdmin throws HintException; the two write callers
(togglesubadmins.php, provisioning_api addSubAdmin) surface a clean error.
- deleteSubAdmin and the post-delete cleanup hooks stay enabled so admins
can prune dormant assignments.
The Users settings page hides the group-admin column when disabled, and the
option is documented in config.sample.php with a security note.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
0 commit comments