Commit graph

3223 commits

Author SHA1 Message Date
Carl Schwan
aafaa39515
Multiple fixes
- Fix tests
- Use non deprecated event stuff
- Add a bit of type hinting to the new stuff
- More safe handling of instanceOfStorage (share might not be the first
  wrapper)
- Fix resharing

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-03 13:24:38 +02:00
Vincent Petry
cc7564758b
Fix view-only code after code review comments
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:20 +02:00
Vincent Petry
cf3d92015b
Fix share attribute related tests + code style
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:19 +02:00
Vincent Petry
f1ab964819
Add share attributes + prevent download permission
Makes it possible to store download permission

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:13 +02:00
Thomas Citharel
618bbb313c Fix reading blob data as resource
PostgreSQL returns data as resource when using IQueryBuilder::PARAM_LOB
(which is used for QBMapper).

Previously we just converted this resource using settype, which produced
things like "Resource id #14" instead of the actual resource data.

Now we read the stream correctly if the returned data is a resource

See context at #22472

Fixes #22439

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-07-25 15:59:36 +00:00
Arthur Schiwon
28eac9c961 load widgets only of enabled apps
- per design, all enabled apps have their registration run
- limitations, e.g. enabled by group, are not considered in that state,
  because we do not have a session (and might need apps?)
- before instantiation of widget it has to be checked whether the providing
  app is actually enabled for the logged in user.
- a public interface is being changed, but it is not meant to be
  implemented or used outside of the core handling. Therefore save to
  backport.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-23 15:48:33 +00:00
blizzz
eeb4de0763
Merge pull request #32708 from nextcloud/unencrypted-size-24
[24] store unencrypted size in the unencrypted_size column
2022-06-11 00:42:34 +02:00
Robin Appelman
fd2afe604e
store unencrypted size in the unencrypted_size column
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-03 15:43:50 +02:00
Côme Chilliet
5a7752dcfa Add the ISizeEstimationMigrator interface for method getExportEstimatedSize
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-31 00:19:13 +00:00
Côme Chilliet
dde192da4a Implement getExportEstimatedSize in migrators
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-31 00:19:13 +00:00
Côme Chilliet
c16b72f588 Add a method to get estimated export size in IMigrator
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-31 00:19:13 +00:00
Robin Appelman
32cd1bed38 tell mysql to ignore the sort index for search queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-05-16 09:53:43 +00:00
Louis Chemineau
11bd644251 Use email settings in DAV search
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-05-12 15:05:10 +02:00
Louis Chemineau
55fda0b769 Use share setting in DAV search
shareapi_restrict_user_enumeration_full_match_ignore_second_display_name was introduced to ignore second display name during search from the share panel. But this setting was not respected by search from the calendar application. This fix it.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-05-12 15:05:05 +02:00
Vincent Petry
3ca797129c
Merge pull request #31839 from nextcloud/feat/metadata-server
Add a metadata service to store file metadata
2022-04-14 13:39:31 +02:00
Vincent Petry
78c8e57896
Fix migrators according to exceptions
Fixed syntax errors.
Removed if condition for copyToFolder since it's void now.
Change signature of setMigratorVersions to also be void.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-04-13 16:52:40 +02:00
Côme Chilliet
a77ffe8593
Adapt user_migration APIs to have information about failures
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-13 16:52:39 +02:00
Carl Schwan
7817845538 Add a metadata service to store file metadata
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-13 14:06:29 +02:00
Vincent Petry
483741ff36
Merge pull request #31220 from nextcloud/enhancement/31005/temporary-passwords
Temporary passwords for public non-anonymous protected shares (ie: files shared with an email recipient).
2022-04-12 09:46:31 +02:00
Cyrille Bollu
c6a5c07041 Adds a "Request password" button to the public share authentication page for shares
of type TYPE_EMAIL, when the "video verification" checkbox isn't checked. Users accessing
non-anonymous public shares (TYPE_EMAIL shares) can now request a temporary password themselves.

- Creates a migration step for the files_sharing app to add the 'password_expiration_time'
  attribute to the oc_shares table.
- Makes share temporary passwords' expiration time configurable via a system value.
- Adds a system config value to allow permanent share passwords

-Fixes a typo in a comment in apps/files_sharing/src/components/SharingEntryLink.vue

See https://github.com/nextcloud/server/issues/31005

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
2022-04-11 21:58:24 +02:00
Côme Chilliet
dda51d49d7 Use Migrators id instead of class names
This will help with UI and means migrators can move in namespaces
 without changing export format.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-11 13:59:27 +00:00
Carl Schwan
682468ef5c
Merge pull request #31848 from nextcloud/performance/trottling-capability-frontent
Don't inject Bruteforce capability info in the webui
2022-04-11 10:50:52 +02:00
Christopher Ng
2273ddc873 Extend migrator interface
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-04-08 19:31:22 +00:00
Vincent Petry
0d7d28e530
Merge pull request #31676 from nextcloud/enh/ocp-owner-lock
Add public API for owner based file locking
2022-04-08 17:43:26 +02:00
Robin Appelman
9834350ac3
Merge pull request #31713 from nextcloud/fed-performance
Federated share performance improvements
2022-04-07 18:53:36 +00:00
Carl Schwan
0f924e086a
Merge pull request #31850 from nextcloud/performance/heartbeat-fetch-status-once
Fetch status in heartbeat controller only once
2022-04-07 18:20:43 +02:00
Carl Schwan
69b36fc2c5 Don't inject Bruteforce capability info in the webui
This capability do DB access and as far I know is not used by the webui.
This remove one DB query for each page load.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-07 17:33:29 +02:00
Carl Schwan
1dbe7dafe2 Fetch status in heartbeat controller only once
Store the user status inside the event instead of fetching it again

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-07 15:16:34 +02:00
Julius Härtl
9b408d556d
Adapt LockScope to LockContext rename
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-07 11:52:16 +02:00
Vincent Petry
b8b4d247b4
Merge pull request #31194 from nextcloud/feat/allow-to-exclude-groups-from-password-enforcement
Allow to disable password policy enforcement for selected groups
2022-04-06 10:13:23 +02:00
Carl Schwan
a29251e02d Allow to disable password policy enforcement for selected groups
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Co-authored-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-04-05 17:04:17 +00:00
Robin Appelman
89d3cd1447
don't overwrite the etag from storage backends that already provide "good" etags
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 16:48:18 +02:00
Robin Appelman
44a8ebdc1f
optimize getById on LazyUserFolder to not require a full fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 15:40:16 +02:00
Robin Appelman
99ac46d8f5
allow getting mounts by providers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 14:57:56 +02:00
Carl Schwan
7d272c54d0 Add a built-in profiler inside Nextcloud
The webui is provided by a seperate application named profiler

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-04 10:28:26 +02:00
Julius Härtl
40f1ad60c2
Add public API for owner based locking
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-04 09:02:56 +02:00
Côme Chilliet
efebbacca4 Add octetLength and charLength to function builder, and tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 20:35:02 +00:00
Vincent Petry
91ab4e1df4
Add missing PHPDoc in InvalidateMountCacheEvent
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-03-24 21:02:25 +01:00
Robin Appelman
881e107543
Apply suggestions from code review
Co-authored-by: Louis <6653109+artonge@users.noreply.github.com>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:41:37 +01:00
Robin Appelman
63ad99ba4a
fix method name
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:04:01 +01:00
Robin Appelman
6b085b6fd1
add logic to perform a full filesystem setup when needed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:03:10 +01:00
Robin Appelman
506d29c095
update cached mounts when only specific providers have been setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:55 +01:00
Robin Appelman
469a684d45
allow getting mounts by provider
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:38 +01:00
Robin Appelman
04052a9594
allow getting cached mounts by path from the mount cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:12 +01:00
Joas Schilling
0acd4b5f82
Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-id
Extract request id handling to dedicated class so it can be injected without DB dependency
2022-03-22 12:08:45 +01:00
Carl Schwan
34988cff19
Merge pull request #24166 from nextcloud/imaginary-prototype
Send images to Imaginary docker to generate previews
2022-03-18 12:32:56 +01:00
Carl Schwan
d70e9d6516
Merge pull request #30768 from nextcloud/feat/chunked-mysql-joblist-remove
Do chuncked job deletion
2022-03-18 12:29:42 +01:00
Carl Schwan
c870bd1968 Do chuncked job deletion
This is helpful in cases where we are deleting tons jobs at the same
time in a gallera cluster. This doesn't happen often but this can create
issues.

Test plan:

1. Use https://github.com/nextcloud/quota_warning/pull/88
2. Change max to 1
3. Enabled/Disable quota_warning app and see jobs getting sucessfully
   added and removed

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-17 21:41:58 +01:00
Christopher Ng
c505bb1449 Add example to DocBlock
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-17 16:33:19 +00:00
Christopher Ng
2d9d0702f0 Add method to set all account properties from json
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-17 16:33:19 +00:00