SelfEditFieldGuard
class SelfEditFieldGuard (View source)
Gates auth-critical fields on user self-edit API paths (#1327).
A caller with only user_edit_own may edit their contact fields but not
username (login/audit identity), use_ldap (disabling it converts the
account to local auth), or active. Unchanged values pass so GET->PUT
round-tripping clients keep working.
Constants
| RESTRICTED_FIELDS |
Fields a self-editor without user_edit_others may not change. |
Methods
static string|null
apply(PermissionService $permissionService, int $callerId, int $targetUserId, array $currentUser, array $input)
Apply the gate to an update input array.
Details
static string|null
apply(PermissionService $permissionService, int $callerId, int $targetUserId, array $currentUser, array $input)
Apply the gate to an update input array.