-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(files_sharing): add new file request
option
#46007
Conversation
839db3d
to
88cbafb
Compare
if ($passwordExpire === false || $share->getSendPasswordByTalk()) { | ||
$send = $this->sendPassword($share, $share->getPassword()); | ||
if ($passwordEnforced && $send === false) { | ||
$this->sendPasswordToOwner($share, $share->getPassword()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument Note
$passwordExpire = $this->config->getSystemValue('sharing.enable_mail_link_password_expiration', false); | ||
$passwordEnforced = $this->shareManager->shareApiLinkEnforcePassword(); | ||
if ($passwordExpire === false || $share->getSendPasswordByTalk()) { | ||
$send = $this->sendPassword($share, $share->getPassword(), $validEmails); |
Check notice
Code scanning / Psalm
PossiblyNullArgument Note
|
||
// The "Reply-To" is set to the sharer if an mail address is configured | ||
// also the default footer contains a "Do not reply" which needs to be adjusted. | ||
$initiatorEmail = $initiatorUser->getEMailAddress(); |
Check notice
Code scanning / Psalm
PossiblyNullReference Note
5078c79
to
e1f0d92
Compare
apps/files_sharing/src/components/NewFileRequestDialog/FileRequestDatePassword.vue
Outdated
Show resolved
Hide resolved
apps/files_sharing/src/components/NewFileRequestDialog/FileRequestDatePassword.vue
Outdated
Show resolved
Hide resolved
apps/files_sharing/src/components/NewFileRequestDialog/FileRequestDatePassword.vue
Outdated
Show resolved
Hide resolved
apps/files_sharing/src/components/NewFileRequestDialog/FileRequestFinish.vue
Outdated
Show resolved
Hide resolved
apps/files_sharing/src/components/NewFileRequestDialog/FileRequestFinish.vue
Outdated
Show resolved
Hide resolved
apps/files_sharing/src/components/NewFileRequestDialog/FileRequestFinish.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed PHP only, all good except from psalm errors to fix. (and openapi)
e1f0d92
to
b814a0f
Compare
</NcButton> | ||
|
||
<!-- Align right --> | ||
<span class="dialog__actions-separator" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something the designers wanted? Because it breaks consistent style of dialog actions, the idea is to have it look always similar and on the time creating it was said that buttons should always be aligned on one side to not need to search the whole width of the element.
Because if this is something designers wanted we should change the way the dialog works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let them speak for themselves when I ask for a design review
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
import { generateOcsUrl } from '@nextcloud/router' | ||
import { getCapabilities } from '@nextcloud/capabilities' | ||
import { showError, showSuccess } from '@nextcloud/dialogs' | ||
import { translate, translatePlural } from '@nextcloud/l10n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { translate, translatePlural } from '@nextcloud/l10n' | |
import { n, t } from '@nextcloud/l10n' |
We have the aliases, so we can use them. This also allows to not use this.t
or this.n
which is quite weird syntax as the translation methods are not bound to the component instance but only added as methods to be used in template.
apps/files_sharing/src/components/NewFileRequestDialog/FileRequestIntro.vue
Outdated
Show resolved
Hide resolved
apps/files_sharing/src/components/NewFileRequestDialog/FileRequestIntro.vue
Outdated
Show resolved
Hide resolved
document.body.appendChild(mountingPoint) | ||
|
||
// Init vue app | ||
const NewFileRequestDialog = new Vue({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just use spawnDialog
helper from @nextcloud/dialogs
if you like :)
b814a0f
to
3eb2316
Compare
This comment was marked as resolved.
This comment was marked as resolved.
b29a7e6
to
3db5dbf
Compare
|
||
// The "Reply-To" is set to the sharer if an mail address is configured | ||
// also the default footer contains a "Do not reply" which needs to be adjusted. | ||
if ($initiatorUser && $this->settingsManager->replyToInitiator()) { |
Check failure
Code scanning / Psalm
UndefinedThisPropertyFetch Error
throw new HintException( | ||
'Failed to send share by mail', | ||
$this->l->t('Failed to send share by email'), | ||
$e->getCode(), |
Check notice
Code scanning / Psalm
PossiblyInvalidArgument Note
$emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); | ||
if ($initiatorUser && $this->settingsManager->replyToInitiator()) { | ||
$initiatorEmail = $initiatorUser->getEMailAddress(); | ||
if ($initiatorEmail) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
// also the default footer contains a "Do not reply" which needs to be adjusted. | ||
if ($initiatorUser && $this->settingsManager->replyToInitiator()) { | ||
$initiatorEmail = $initiatorUser->getEMailAddress(); | ||
if ($initiatorEmail) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
8b5ddaf
to
e16071a
Compare
7d41921
to
a8bdf4a
Compare
3997925
to
51eeebe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you so much!
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
…actor sendMailNotification Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
… storing email arrays Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
51eeebe
to
4b3aa01
Compare
* ], | ||
* ... | ||
* ] | ||
* | ||
* @return array formatted IAttributes | ||
* @since 25.0.0 | ||
* @since 30.0.0, `enabled` was renamed to `value` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skjnldsv Please document in https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_30.html#id1
(escpecially this "breakage", but also all changes in lib/public/ (even if you type only))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also FYI @tobiasKaminsky since this is actually used when you want to set the attribute through the OCS API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which attribute? 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`enabled` is now `value`. See nextcloud/server#46007. Signed-off-by: Max <max@nextcloud.com>
closes #45446