Faraz Samapoor
a988754e3d
Refactors lib/private/SystemTag.
...
Mainly using PHP8's constructor property promotion.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-11-07 09:41:33 +03:30
Joas Schilling
6b7221756c
Merge pull request #39571 from nextcloud/bugfix/noid/move-lib-to-IEventDispatcher
...
Move lib/ events to IEventDispatcher where possible
2023-07-27 18:59:42 +02:00
Marcel Klehr
424937fd39
fix(SystemTagManager): Use truncated tagName in getTag and updateTag
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-07-27 13:56:11 +02:00
Joas Schilling
6953e14580
fix: Move SystemTags events to IEventDispatcher
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:52 +02:00
Arthur Schiwon
49db546f78
fix: include invisible tags for admins
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-06-21 20:28:01 +02:00
Arthur Schiwon
58f7fd2370
use efficient tag retrieval on DAV report request
...
- uses DAV search approach against valid files joined by systemtag selector
- reduced table join for tag/systemtag search
- supports pagination
- no changes to the output formats or similar
Example request body:
<?xml version="1.0"?>
<oc:filter-files xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns " xmlns:nc="http://nextcloud.org/ns " xmlns:ocs="http://open-collaboration-services.org/ns ">
<d:prop>
<d:getcontentlength/>
<d:getcontenttype/>
<d:getetag/>
<d:getlastmodified/>
<d:resourcetype/>
<nc:face-detections/>
<nc:file-metadata-size/>
<nc:has-preview/>
<nc:realpath/>
<oc:favorite/>
<oc:fileid/>
<oc:permissions/>
<nc:nbItems/>
</d:prop>
<oc:filter-rules>
<oc:systemtag>32</oc:systemtag>
</oc:filter-rules>
<d:limit>
<d:nresults>50</d:nresults>
<nc:firstresult>0</nc:firstresult>
</d:limit>
</oc:filter-files>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-06-21 18:19:08 +02:00
Arthur Schiwon
df662f50bd
refactor: remove where specification from SELECT getter
...
- search constraints are now fully in control of
SystemTagsInFilesDetector::detectAssignedSystemTagsIn(), avoids
duplication of a WHERE statement
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-05-10 18:48:06 +02:00
Arthur Schiwon
dbfd2f936a
refactor: remove SystemTag logic from Folder into QuerySearchHelper
...
- adds OC\SystemTag\SystemTagsInFilesDetector where the search logic is
moved to
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-05-09 23:51:52 +02:00
Côme Chilliet
9b1d7794a8
Add chunking in SystemTagObjectMapper::getTagIdsForObjects
...
This avoids crashing on Oracle with more than 1000 objects
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-03-13 17:36:10 +00:00
Marcel Klehr
8151b1b8b0
fix(SystemTagManager): Truncate overlong tag names
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-02-24 12:55:10 +01:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Johannes Leuker
d606799ee2
Add commands to manage tags via OCC
...
list, add, delete, edit
Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
2021-05-25 11:29:32 +02:00
Roeland Jago Douma
7e727a1a31
The objectid is a string
...
This allows the query to use the index. Else it has to resort on
scanning all the rows.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-01-28 22:09:55 +01:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke
fedf9c69d9
Use matching parameter names form interfaces and implementations
...
Found by Psalm 3.14.1
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 18:16:35 +02:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst
85e369cddb
Fix multiline comments
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +02:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
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>
2019-11-22 20:52:10 +01:00
Joas Schilling
69f2974706
Only trigger the events with tags that where actually assigned
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-08-21 11:58:27 +02:00
Joas Schilling
bb352fb667
Use the defined func()->count() instead of manual counting
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-08 15:44:45 +01:00
Roeland Jago Douma
8e5657014d
Make SystemTag strict
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-02-21 22:08:27 +01:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Roeland Jago Douma
5f227bd93b
More phpstorm inspection fixes
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-24 11:39:29 +02:00
Morris Jobke
c54a59d51e
Remove unused use statements
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 -05:00
Jörn Friedrich Dreyer
4e1aca4e3c
don't store empty groupids
...
gives an exception on oracle and shouldn't be added in the first place
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 22:01:37 -06:00
Joas Schilling
ba87db3fcc
Fix others
2016-07-21 18:13:57 +02:00
Vincent Petry
dc21a38a85
Use named parameter instead of direct value for system tags search param ( #25380 )
2016-07-06 22:39:34 +02:00
Vincent Petry
8fbb63d316
Some tweaks for systemtagmanager
2016-05-20 17:56:02 +02:00
Vincent Petry
88740f035d
Act on effective system tag canAssign permission
...
Whenever the server returns true for the can-assign Webdav property of
a system tag, it means the current user is allowed to assign,
regardless of the value of user-assignable.
This commit brings the proper logic to the web UI to make it possible
for users to assign when they have the permission.
2016-05-20 17:56:02 +02:00
Vincent Petry
b5eb3d9e5a
Add system tag assignability check with groups
...
Whenever a user is not an admin, a tag is visible but not
user-assignable, check whether the user is a member of the allowed
groups.
2016-05-20 17:56:02 +02:00
Vincent Petry
3cd65fe25d
Add systemtag_group table and get/set methods
...
Added systemtag to group mapping table.
Added methods in ISystemTagManager to get/set the group mappings.
2016-05-20 17:56:02 +02:00
Vincent Petry
09b3883d9c
Updated canUser* functions in SystemTagManager to accept objects
2016-05-20 17:56:02 +02:00
Vincent Petry
8343cfb64b
Add interface methods for permission check
...
Instead of checking for admin perm, use interface method
canUserAssignTag and canUserSeeTag to check for permissions.
Allows for more flexible implementation.
2016-05-20 17:56:02 +02:00
Roeland Jago Douma
a1373ae259
Move \OC\SystemTag to PSR-4
2016-04-22 20:49:16 +02:00