Commit Graph

39 Commits

Author SHA1 Message Date
Roman Perekhod
04a5ee283e fix default language fallback (#7479)
* fix default language fallback

* Update services/userlog/pkg/config/config.go

Co-authored-by: Martin <github@diemattels.at>

* Update services/notifications/pkg/config/config.go

Co-authored-by: Martin <github@diemattels.at>

* readme updated. local env vars removed

* Update changelog/unreleased/fix-default-mail-language-fallback.md

Co-authored-by: Martin <github@diemattels.at>

* update readme's and envvar texts

* fix changelog text

---------

Co-authored-by: Roman Perekhod <rperekhod@owncloud.com>
Co-authored-by: Martin <github@diemattels.at>
2023-10-17 09:56:48 +02:00
jkoberg
ab10e5e152 use service accounts for notifications
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-08-31 12:11:43 +02:00
Daniel Swärd
6a5e21eff4 Replacing implicit grpc client initialization with explicit package local variables. 2023-07-31 12:57:59 +02:00
Roman Perekhod
f3484c3cdd Improve the notification logs when the user has no email address 2023-07-24 10:41:32 +02:00
Ralf Haferkamp
c9a9fddef1 Consitently switch to stretchr/testify
We were using stretchr/testify and test-go/testify inconsitently and
sometimes mixed in the same tests. This can cause very strange issue,
e.g when using things like mock.MatchedBy().

This moves all our code to stretchr/testify, which seems to be far
more active and maintained then test-go/testify.
2023-06-29 13:44:49 +02:00
Florian Schade
4f26424db6 [full-ci] enhancement: use reva client pool selectors (#6452)
* enhancement: use reva client pool selectors

register mock service to registry and pass tests

* enhancement: bump reva

* Fix a couple of linter issues

---------

Co-authored-by: Ralf Haferkamp <rhaferkamp@owncloud.com>
2023-06-08 12:41:04 +02:00
Roman Perekhod
cd39dd4073 Fix to prevent the email notification X-Site scripting 2023-06-02 09:47:06 +02:00
Roman Perekhod
27322c5bbf The email HTML templates added #6146 (#6147)
* The email HTML templates added #6146

* use a single palne text email template. use fs.FS

* Update services/notifications/README.md

Co-authored-by: Martin <github@diemattels.at>

* Update services/notifications/README.md

Co-authored-by: Martin <github@diemattels.at>

* fix md

---------

Co-authored-by: Roman Perekhod <rperekhod@owncloud.com>
Co-authored-by: Martin <github@diemattels.at>
2023-05-03 10:47:46 +02:00
jkoberg
8b7b8d083a respect disable email setting in notification service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-04-26 15:33:55 +02:00
Roman Perekhod
6cf09321c9 Determine the users preferred language to translate emails via Transifex. #6087 2023-04-21 16:30:48 +02:00
Roman Perekhod
22f8076a4f README.md updated.
returned value swapped
2023-04-17 16:15:21 +02:00
Roman Perekhod
cd59424a16 Make Emails translatable via transifex #6025
The transifex translation add in to the email templates.
The optional environment variable NOTIFICATIONS_TRANSLATION_PATH added to config.
2023-04-16 14:02:40 +02:00
Jörn Friedrich Dreyer
ce9c7b2868 fix notification tests
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-02-16 13:15:57 +00:00
Jörn Friedrich Dreyer
9b00f02383 bump reva to ec27f5f8feb3
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-02-15 15:26:07 +00:00
jkoberg
9bb83c8753 unit tests
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-12 13:21:37 +01:00
jkoberg
63b592a04d membership expired notification
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-12 13:21:11 +01:00
jkoberg
cfe7f39027 share expired notification
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-12 13:20:57 +01:00
David Christofas
445e594eff add notification for space unshares 2022-12-21 11:20:42 +01:00
David Christofas
68ead43000 extract code to methods 2022-12-20 14:42:14 +01:00
Jörn Friedrich Dreyer
b2b4f9893c align revactx package import (#5206)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-08 14:45:30 +01:00
Andre Duffeck
1b764d2142 Handle more events (#5071)
* Handle SpaceShared events

* Adapt to changed ID in the SpaceShared event

* Handle the SpaceUnshared events

* Handle the SpaceUpdated event

* update reva to latest edge

* fix typo

* Disable cyclomatic complexity check for StartAuditLogger

Co-authored-by: Michael Barz <mbarz@owncloud.com>
2022-11-23 14:00:29 +01:00
jkoberg
2443d7d687 use private link syntax for spaceinvite link
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-11-03 15:18:03 +01:00
Christian Richter
b4caf6397c refactor templating, add subject templating
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-10-13 14:29:11 +02:00
Ralf Haferkamp
c6664cfe61 Fix share/space link in notification mail
Use OCIS_URL as the link base. This change also makes sure that the
top-level OcisURL config value gets a default assigned, even when
OCIS_URL is unset.

Fixes: #4688
2022-09-29 16:26:21 +02:00
Ralf Haferkamp
de1588843a Fix notifications for group grantees
For looking up group members we need to pass an authenticated reva context via
the notification interface. We use the share owner's context that we generated
when stating the share target.

Fixes: #4703
2022-09-29 16:26:21 +02:00
Ralf Haferkamp
f71f7c7521 Fix grantee lookup for Share/Space Created event for groups
'ShareCreated' and 'SpaceCreate' events for group shares have an empty
GranteeUserID attribute. We need to lookup the GranteeGroup to get the Grantee
Name for the notification mail

Partial Fix: #4703
2022-09-29 16:26:21 +02:00
Christian Richter
e96ab9f9c8 incorporate requested changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 13:13:30 +02:00
Christian Richter
7a8e1b8106 backport url.JoinPath for go1.18
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:39:50 +02:00
Christian Richter
94024125fb enhance templating
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
0422af2a11 handle spaceshared event
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
c2ef67f661 fix SpacesShared
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
8e0b07b200 add share url to email text
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
6ea8623b55 add email subject
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
daaa08aa09 bugfixes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
70690a318d add space notification
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
22369b33f5 make email templates configurable
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
acdfbabd47 add email templating
Signed-off-by: Christian Richter <crichter@owncloud.com>
Co-authored-by: Jörn Dreyer <jfd@butonic.de>
2022-09-22 09:38:11 +02:00
Christian Richter
f8f1320501 refactor extensions -> services
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-06-27 14:05:36 +02:00
Christian Richter
78064e6bab rename folder extensions -> services
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-06-27 14:05:36 +02:00