Daniel Kesselberg
096fe20611
Help static code analysis to understand code.
It adds proper type hints to private namespace to allow private namespace methods.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
5 years ago
Morris Jobke
d3680e682a
Remove not needed semicolon and PHPDoc hint
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Morris Jobke
fee13e7ffd
Search also the email and displayname in user mangement for groups
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Christoph Wurst
a636aef585
Allow group search by display name
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Robin Appelman
aa83b0b22d
dont get the group details if we only ask for the id
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>
6 years ago
Roeland Jago Douma
5ebb53593c
Improve group queries
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>
6 years ago
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
734c62bee0
Format code according to PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
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>
6 years ago
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
36b3bc8148
Use php keywords in lowercase
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
df9e2b828a
Fix mismatching docblock return types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Joas Schilling
06f97c0fd0
Fix autocomplete suggestions with numeric user ids
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Arthur Schiwon
f0ff8b0307
reformat code for @skjnldsv <3
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Arthur Schiwon
7ff15c9756
fix documentation, get and createGroup may return null
* also have stricter checks in place
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Arthur Schiwon
7b1eedb11e
take group creation result into consideration
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
6db51324fa
Fix DB usersInGroups fetching
* Follow the interface defaults
* Only set limit or offset if they are properly set
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Joas Schilling
b9f963225f
Do not allow to have an empty display name
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Joas Schilling
00859f46f3
Fix DI issue
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Joas Schilling
a54ff49c6b
Remove inherited docs
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Joas Schilling
653628c8fb
Allow to set the group display name in the database backend
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Joas Schilling
45506adc5c
Add a displayname to the database group backend
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Arthur Schiwon
c6c8a41d2f
group display name support (service level + ldap)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Joas Schilling
01b4db62fb
Add dispatcher events to User and Group objects
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Robin Appelman
db750898ee
allow group backends to mark that a group should now be shown in search dialogs
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 years ago
Morris Jobke
84fd81e33f
Fix UniqueConstraintViolationException while insert into oc_groups
* fixes race condition in insert
* fixes potentiaol deadlock
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Joas Schilling
bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Morris Jobke
b458ed9c82
Properly escape column name in "createFunction" call
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
John Molakvoæ (skjnldsv)
9e5885963c
Fixed icons detection and caching
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
8977c71f88
Mixin scss icon api
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
Robin Appelman
605ba57086
Fix groupExists when a backend provides group details
Signed-off-by: Robin Appelman <robin@icewind.nl>
8 years ago
Robin Appelman
8a1cbbd90e
Don't pretend we can add/remove users to/from groups when we can't
Signed-off-by: Robin Appelman <robin@icewind.nl>
8 years ago
John Molakvoæ (skjnldsv)
cc2d58a850
Keep userids as keys on group search
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
7b57c1a905
Tabs fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
c55cf79453
Added total count for subadmins
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
10c135ca34
Added disabled count per groups
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
Roeland Jago Douma
961b27eeb0
Convert group Database backend
This now uses the new interfaces
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Joas Schilling
b98c218201
Remove orderBy so the query works correctly on postgres
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Joas Schilling
421a00854c
Make sure DI is done
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Joas Schilling
7ea00b7b5f
Move the group database backend fully to query builder
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
John Molakvoæ (skjnldsv)
00122fa027
Use group displayNames in users list
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago