* move error-related code for groups to its own file
* update group avatar logic
remove unused/duplicate logic
* update `FindGroupsOptions.ToConds()`
allow passing `-1` as the `ParentGroupID`, meaning "find matching groups regardless of the parent group id"
* add `DedupeBy` function to container module
this removes duplicate items from a slice using a custom function
* add `SliceMap` util
works like javascripts's `Array.prototoype.map`, taking in a slice and transforming each element with the provided function
* add group service
functions included so far:
- avatar uploading/deletion
- group deletion
- group creation
- group moving (including moving item inside a group)
- group update
- team management
- add team
- remove team
- update team permissions
- recalculating team access (in event of group move)
- group searching (only used in frontend/web components for now)
Follow #32460
Now the code could be much clearer than before and easier to maintain. A
lot of legacy code is removed.
Manually tested.
This PR is large enough, that fine tunes could be deferred to the future if
there is no bug found or design problem.
Screenshots:
<details>

</details>
We have some instances that only allow using an external authentication
source for authentication. In this case, users changing their email,
password, or linked OpenID connections will not have any effect, and
we'd like to prevent showing that to them to prevent confusion.
Included in this are several changes to support this:
* A new setting to disable user managed authentication credentials
(email, password & OpenID connections)
* A new setting to disable user managed MFA (2FA codes & WebAuthn)
* Fix an issue where some templates had separate logic for determining
if a feature was disabled since it didn't check the globally disabled
features
* Hide more user setting pages in the navbar when their settings aren't
enabled
---------
Co-authored-by: Kyle D <kdumontnu@gmail.com>
Change all license headers to comply with REUSE specification.
Fix#16132
Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>