Arthur Schiwon
ee096f8629
fix(LDAP): ensure stored groups are formatted as simple list
With array_unique it is possible that the keys are not in sequential order
but have gaps. json_encode then would store them as associative array,
which later on json_decode would result in a stdClass by default. This is
unexpected and would also contradict the return type hint.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 months ago
Arthur Schiwon
37237dc183
feat(LDAP): warn about demoting a group while promoting another
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 months ago
Arthur Schiwon
18e6c9f5bc
enh(LDAP): add occ command to promote an LDAP group to admin
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 months ago
Arthur Schiwon
d6b356c63b
enh(LDAP): implement IIsAdmin interface
- add configuration to specify one LDAP group acting as admin group (CLI)
- implement `isAdmin()` method, basically relying on inGroup against the
configured group
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 months ago
Côme Chilliet
adc43eae9b
Invert parameter order in getDisabledUserList to be consistent
This matches what was done in the calls and so fixes getting disabled
user list when there are several backends returning disabled users.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
8 months ago
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
7 months ago
Arthur Schiwon
d978050666
fix(LDAP): prevent incomplete displaynames…
… when reading users from primary groups or gidNumber-based groups
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 months ago
Côme Chilliet
6b7d4b67d1
Improve setup checks naming and improve database version check
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
8 months ago
Côme Chilliet
2e4d1549a4
Change SetupResult API to named constructors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
8 months ago
Côme Chilliet
b41b9cf4c0
Small cleanups in SetupCheck classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
9 months ago
Côme Chilliet
0890012e72
Fix SetupChecks/LdapInvalidUuids.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
9 months ago
Carl Schwan
c71e47f5c3
Progress
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Côme Chilliet
05efbf11d9
Fix LDAP LoginListener by adding new group relationships to caches before firing the event
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
9 months ago
Côme Chilliet
800b1b7031
Fire group events at login for LDAP groups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
6e38cb197a
Add logging to be able to debug FirstLoginListener
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
4f2048851c
Move event listener registration to register()
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
2e52e39aff
Use a standard array for the stateful cache
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
474b5e1a05
Add FirstLoginListener to accept shares upon first ldap user login
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Arthur Schiwon
cce8d0a7a5
fix(LDAP): solve race condition reading groups of disappeared LDAP user
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 months ago
Arthur Schiwon
c1480aade4
refactor(LDAP): pass IConfig via constructor to Group_LDAP
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 months ago
Arthur Schiwon
cb3faad5b5
fix(ldap): store last known user groups
- for LDAP user life cycle management
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 months ago
Marcel Klehr
7f5b61c66d
Update apps/user_ldap/lib/User/User.php
Co-authored-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
9 months ago
Marcel Klehr
66f6e94d7d
LDAP: Increase profile picture limit to 512
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
10 months ago
Hamid Dehnavi
d64bbc8bd3
Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
1 year ago
jld3103
c2d45cb172
Add single status code descriptions for OpenAPI
Signed-off-by: jld3103 <jld3103yt@gmail.com>
9 months ago
Côme Chilliet
7a59d2ec07
Remove deprectated ILogger uses from user_ldap application
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
9 months ago
Côme Chilliet
2c8b415c55
Move new methods to a new interface in OCP
This avoids breaking compatibility for group backends not based on
ABackend abstract class.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
10 months ago
Côme Chilliet
a5fa1e7715
Fix psalm errors about groupExists return type
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Carl Schwan
3270b7f12e
Add batch methods in user backends
This allows for faster group search with significantly less DB traffic
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Anna Larch
5d5134e615
Do not log passwords in debug mode
Signed-off-by: Anna Larch <anna@nextcloud.com>
10 months ago
Aaron Dewes
16908999ed
Simplify escapeFilterPart
Signed-off-by: Aaron Dewes <aaron.dewes@protonmail.com>
1 year ago
Aaron Dewes
13d9494af3
Escape some more values
Signed-off-by: Aaron Dewes <aaron.dewes@protonmail.com>
1 year ago
AaronDewes
c42d9d439a
Fix: Escape group names for LDAP
Groups may contain special characters (Like "(" or ")") that should be escaped to ensure geenrted queries are correct.
Signed-off-by: AaronDewes <aaron.dewes@protonmail.com>
1 year ago
Côme Chilliet
a0808111b4
Add unique index for user_ldap group memberships
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
b8a0954f55
Fix check-group --update for deleted groups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
5425f7d3bd
Use BIGINT for new table id field
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
7732de75ee
Removed GroupCreatedEvent/GroupDeletedEvent from UpdateGroupsService
This should be handled when mapping groups, not when registering their
members. An empty group may still exist.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
ad1e487f67
Dispatch UserRemovedEvents for removed groups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
c33c40f677
[user_ldap] Small perf improvements suggestion from review
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
1026b2131c
Fix check-group command for new groups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
42448c0d78
Fix getKnownGroups return value
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
7a14aa748e
Add output to check-group --update command
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
ce5a4e5b66
Always empty cache before updating a group
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
1b102ca9b3
Fix errors in UpdateGroupsService.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
ec13f22ae3
Add missing primary key for ldap_group_membership
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
f9ed48eab9
Add check-group command
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
2c19aac9e1
Move UpdateGroups methods to a service
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
34fa4138fb
Add group events to UpdateGroups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
Côme Chilliet
d8142b6a5a
Refactor user_ldap group membership to use flat DB
Move away from serialized arrays. Also use a QBMapper class for the new table.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
11 months ago
jld3103
61a13bed4d
user_ldap: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
1 year ago