aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Group
Commit message (Collapse)AuthorAgeFilesLines
* fix(OpenAPI): Adjust array syntax to avoid ambiguitiesfix/openapi/array-syntaxprovokateurin2024-11-053-4/+4
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(db): Correctly apply query typesGit'Fellow2024-10-171-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | fix: psalm fix: error fix: add batch fix: fatal error fix: add batch chore: add batch chore: add batch fix: psalm fix: typo fix: psalm fix: return bool fix: revert Manager
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-192-2/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-254-7/+7
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix: Ensure database connection is setup when getting group detailsFerdinand Thiessen2024-08-061-0/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* feat(users): Add support for admin delegation for users and groups managementLouis Chemineau2024-07-222-18/+20
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* feat(security): Add public API to allow validating IP Ranges and checking ↵Joas Schilling2024-07-191-3/+3
| | | | | | | for "in range" Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* feat(security): restrict admin actions to IP rangesBenjamin Gaussorgues2024-07-191-12/+12
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* chore: Add SPDX headerAndy Scherzinger2024-05-246-159/+22
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Merge pull request #44763 from nextcloud/fix/group_name_length_dbBenjamin Gaussorgues2024-05-162-16/+31
|\
| * fix(groups): allows to save group names with more than 64 charactersBenjamin Gaussorgues2024-04-222-16/+31
| | | | | | | | | | | | Mimic behaviour from LDAP users and add a hard limit to 255 characters Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* | fix: Fix newly spotted psalm issues, add exhaustive typed magic properties ↵Côme Chilliet2024-04-301-18/+7
|/ | | | | | for LDAP classes Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-023-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: always add user to group cacheHugo Renard2024-03-261-3/+1
| | | | | | | When there is no user in a group, and we add one, it's not added to the group cache. So consecutive call of addUser() and getUsers() is inconsistent. Furthermore, the user cache is never null, so this check is unesserary. Signed-off-by: Hugo Renard <hugo.renard@protonmail.com>
* fix(admin role): fix old and wrong way to determine whether user is adminArthur Schiwon2024-02-191-1/+2
| | | | | | | | | - fixes Settings knowing who is an admin of non-local group backend groups - obsoletes and removes a little old, deprecated code - double checks proper parameter type on Group\Manager::isAdmin - also fixes legacy OC_User code to check whether user is an admin Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: Fix missing template parameter for IEventListenerCôme Chilliet2024-01-301-0/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-234-17/+17
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* refactor: Repalce array_search with in_array in lib/Christoph Wurst2023-11-221-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #38425 from nextcloud/feat/ocp/strict-igroupChristoph Wurst2023-11-021-16/+14
|\ | | | | feat(ocp): Add types and strict typing to \OCP\Group\IGroup
| * feat(ocp): Add types and strict typing to \OCP\Group\IGroupChristoph Wurst2023-09-061-16/+14
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Build query once instead of in-loopCôme Chilliet2023-09-071-5/+6
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix psalm spotted type errorsCôme Chilliet2023-09-051-8/+8
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Move new methods to a new interface in OCPCôme Chilliet2023-09-052-5/+19
| | | | | | | | | | | | | | This avoids breaking compatibility for group backends not based on ABackend abstract class. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Add batch methods in user backendsCarl Schwan2023-09-052-15/+135
|/ | | | | | This allows for faster group search with significantly less DB traffic Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* fix(cache): Remove displayname cache entry on deleteJoas Schilling2023-08-281-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix!: Remove symfony EventDispatcherInterface from GroupJoas Schilling2023-07-272-34/+24
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: getGroups limit check syntaxJohn Molakvoæ2023-05-111-1/+1
| | | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
* revert public interface back to the original types, just cast them before ↵Robin Appelman2023-05-111-5/+5
| | | | | | passing the nulls to the backends Signed-off-by: Robin Appelman <robin@icewind.nl>
* also update groupinterface and database backendRobin Appelman2023-05-111-3/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix default values and type hints for GroupManager::searchRobin Appelman2023-05-111-2/+2
| | | | | | ints really are ints Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix tests, and fix Group::searchUsers to avoid duplicatesCôme Chilliet2023-05-021-10/+7
| | | | | | | | Also went back to searchUsers indexing the array by uid as it was the previous behavior and the IGroup phpdoc does not say anything about the keys. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update version number in since and deprecated annotationsCôme Chilliet2023-04-271-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Clear up return typesCôme Chilliet2023-04-273-4/+4
| | | | | | usersInGroup index by int for BC, searchInGroup index by uid (string). Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Make code clearer and bump @ deprecated annotationsCôme Chilliet2023-04-271-4/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Split new method in a new group backend interfaceCarl Schwan2023-04-272-60/+22
| | | | | | Better for backward compatibility, also move new interfaces to nc 26 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Optimize retrieving display name when searching for users in a groupCarl Schwan2023-04-272-11/+58
| | | | | | | | | This is recurrent scenario that we are searching for users and then for each users we fetch the displayName. This is inefficient, so instead try to do one query to fetch everything (e.g. Database backend) or use the already existing DisplayNameCache helper. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* dispatch new BeforeGroupChangedEvent before setDisplayName on groupsJulien Veyssier2023-02-211-0/+2
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* composer run cs:fixCôme Chilliet2023-01-201-10/+9
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add group display name cacheAnna Larch2022-11-283-2/+104
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Do not ignore return value of deleteGroup from backendCôme Chilliet2022-04-041-2/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-9/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Strong type OC\Group\MetaDataCôme Chilliet2022-03-081-19/+11
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix typing of OC\Group\MetaData::sortingCôme Chilliet2022-03-081-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-045-26/+8
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix indentation errorTom Grant2021-03-171-4/+4
| | | | Signed-off-by: tgrant <tom.grant760@gmail.com>
* Fix null displayname crash as described in #21885tgrant2021-03-171-1/+5
| | | | Signed-off-by: tgrant <tom.grant760@gmail.com>
* Merge pull request #25660 from hosting-de/feature/add-backend-list-groupsRoeland Jago Douma2021-03-052-1/+31
|\ | | | | Show group backends in occ group:list --info and group:info
| * Show group backends in occ group:list --info and group:infoJohannes Leuker2021-03-012-1/+31
| | | | | | | | Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
* | Fix types in the Group ManagerRoeland Jago Douma2021-03-031-5/+5
|/ | | | | | | | | Psalm found an issue. However the issue found was because of lying docblocks. Fixed those and did some typing to make it all better. For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-081-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>