summaryrefslogtreecommitdiffstats
path: root/lib/private/Group
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-164-3/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add typed events for adding and removing a subadminMorris Jobke2020-10-281-1/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #22890 from ↵Roeland Jago Douma2020-09-171-1/+2
|\ | | | | | | | | nextcloud/techdebt/18680/help-static-code-analysis-understand-code Help static code analysis to understand code
| * Help static code analysis to understand code.Daniel Kesselberg2020-09-161-1/+2
| | | | | | | | | | | | It adds proper type hints to private namespace to allow private namespace methods. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Remove not needed semicolon and PHPDoc hintMorris Jobke2020-09-161-1/+0
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Search also the email and displayname in user mangement for groupsMorris Jobke2020-08-051-6/+18
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow group search by display nameChristoph Wurst2020-06-101-0/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20776 from nextcloud/enh/limit_group_queriesRoeland Jago Douma2020-05-221-6/+20
|\ | | | | Improve group queries
| * Improve group queriesRoeland Jago Douma2020-05-021-6/+20
| | | | | | | | | | | | | | | | | | | | | | Before we'd also get the diplayname for each group in the backend. In a separate query. This is of course not ideal as this information is obtained on each and every query. Now this is queried once and properly cached. Also added more caching to the manager. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | dont get the group details if we only ask for the idRobin Appelman2020-05-071-21/+30
|/ | | | | | | currenty when getting the groups for a user, the full group object is always created (and cached) even if only the groupid is required Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headers for 19Christoph Wurst2020-04-291-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code according to PSR2Christoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-102-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-104-15/+14
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-102-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20391 from nextcloud/refactor/spaces-cleanupChristoph Wurst2020-04-091-2/+2
|\ | | | | Remove all extra whitespace PSR2 does not like