X Tutup
Skip to content

Trigger dav events for the public.php/webdav endpoint#35759

Merged
DeepDiver1975 merged 4 commits intomasterfrom
public_dav_events
Jul 15, 2019
Merged

Trigger dav events for the public.php/webdav endpoint#35759
DeepDiver1975 merged 4 commits intomasterfrom
public_dav_events

Conversation

@jvillafanez
Copy link
Member

Description

Trigger events in order to know when the public.php/webdav endpoint is being accessed. The main goal for this is to know when a download through this public endpoint happens.
Note that these events aren't being listened by anyone for now.

Related Issue

Foundation to solve https://github.com/owncloud/admin_audit/issues/162

Motivation and Context

This will allow us to know when a file is being downloaded through the public.php/webdav endpoint, or when a file is being uploaded through the same endpoint (assuming enough permissions to do so)

How Has This Been Tested?

Manual modifications in the code to ensure the events are being triggered

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@codecov
Copy link

codecov bot commented Jul 4, 2019

Codecov Report

Merging #35759 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35759      +/-   ##
============================================
- Coverage     65.81%   65.76%   -0.05%     
- Complexity    18818    18824       +6     
============================================
  Files          1228     1229       +1     
  Lines         70982    71030      +48     
  Branches       1289     1289              
============================================
  Hits          46716    46716              
- Misses        23888    23936      +48     
  Partials        378      378
Flag Coverage Δ Complexity Δ
#javascript 53.7% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 67.14% <0%> (-0.06%) 18824 <6> (+6)
Impacted Files Coverage Δ Complexity Δ
apps/dav/appinfo/v1/publicwebdav.php 0% <0%> (ø) 0 <0> (ø) ⬇️
...s/dav/lib/Files/Sharing/PublicLinkEventsPlugin.php 0% <0%> (ø) 6 <6> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 367cc9d...b4ff5c1. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 4, 2019

Codecov Report

Merging #35759 into master will increase coverage by 0.01%.
The diff coverage is 95.23%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35759      +/-   ##
============================================
+ Coverage     65.81%   65.83%   +0.01%     
- Complexity    18818    18824       +6     
============================================
  Files          1228     1229       +1     
  Lines         70982    71024      +42     
  Branches       1289     1289              
============================================
+ Hits          46716    46756      +40     
- Misses        23888    23890       +2     
  Partials        378      378
Flag Coverage Δ Complexity Δ
#javascript 53.7% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.87% <95.23%> (-0.33%) 18824 <6> (+6)
Impacted Files Coverage Δ Complexity Δ
apps/dav/appinfo/v1/publicwebdav.php 0% <0%> (ø) 0 <0> (ø) ⬇️
...s/dav/lib/Files/Sharing/PublicLinkEventsPlugin.php 100% <100%> (ø) 6 <6> (?)
apps/files_external/lib/Lib/Storage/Swift.php 66.16% <0%> (ø) 0% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 367cc9d...9071640. Read the comment docs.

@jvillafanez jvillafanez requested a review from DeepDiver1975 July 4, 2019 12:48
Copy link
Contributor

@sharidas sharidas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly add php docs for the functions. Other wise it looks ok.

Copy link
Contributor

@sharidas sharidas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

jvillafanez and others added 4 commits July 11, 2019 13:43
Add token to the event dispatched for the
dav public link accessed.

Signed-off-by: Sujith H <sharidasan@owncloud.com>
@sharidas sharidas force-pushed the public_dav_events branch from 9071640 to e51d2fc Compare July 11, 2019 08:14
@sharidas
Copy link
Contributor

  • Added token to the event.

@DeepDiver1975 DeepDiver1975 merged commit 1665aba into master Jul 15, 2019
@delete-merged-branch delete-merged-branch bot deleted the public_dav_events branch July 15, 2019 06:27
@sharidas
Copy link
Contributor

Backport PR: #35820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup