Commit graph

337 commits

Author SHA1 Message Date
fenn-cs
713f2667c1 fix(share): Send empty expireDate when not expireDate set
When creating a new share, if the user unchecks "Set expiry date"

no `expireDate` is sent to the server.

However, the server then assumes the default configured, hence better

to send an empty value.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>

[skip ci]
2024-04-16 09:51:39 +01:00
Ferdinand Thiessen
697dafaabc
fix(files_sharing): Disable autocomplete for share label and password
Prevent browsers - as good as possible - from filling in user credentials as share label and password.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-04-02 14:10:19 +02:00
Ferdinand Thiessen
237e78c84e fix(files_sharing): Create passwords when enforced for mail shares
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-03-29 14:36:02 +00:00
fenn-cs
7474f4da48 fix: List specific share permissions as subline
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-03-18 10:47:28 +01:00
fenn-cs
ac7d767461 Show quick permission subline on newline
- Show quick permission details/explanations on subline

- Fix icon colors, should be white (or component set color) when highlighted.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-03-18 10:47:28 +01:00
fenn-cs
6570f8711e
fix: No password set for new mail shares
Before the password is set on a new share, the computed property `hasUnsavedPassword`
is used to check that `this.share.newPassword` is not undefined. Direct assignment without
using Vue's `this.$set` makes it impossible for vue to detect that changes have happened on the share
object. Hence the inreactivity.
This worked initially most likely because `this.share.newPassword = await GeneratePassword()` was executed
before the computed properties where evaluated.
Resolves : https://github.com/nextcloud/server/issues/43919

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-03-14 13:41:23 +01:00
fenn-cs
7200241932 Fix undefined share object during expirationDate update
In 04e8733721 a regression was introduced.

`this` means nothing inside arrow functions, hence this.share was referring to

an undefined object and so all attempted updates for expiration dates would fail.

Resolves : https://github.com/nextcloud/server/issues/43256

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-02-21 11:43:31 +01:00
Grigorii K. Shartsev
1619d1c7d5 fix(files_sharing): lost styles for SharingEntryLink
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
2024-02-13 20:46:29 +00:00
Joas Schilling
2b3cefc983 fix(sharing): Move video verification option to password and hide without Talk
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-02-13 10:06:32 +00:00
Grigorii K. Shartsev
01ce061cc8 fix(sharing): migrate QuickShareSelect to NcActions
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
2024-02-08 10:52:44 +00:00
John Molakvoæ
647b8746b0 fix(files): add mount root property and adjust delete wording
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2024-02-06 20:50:47 +00:00
fenn-cs
d36c002305 Use @nextcloud/capabilities to obtain share api defaults
- Remove redundant initial state added

- Call `getCapabilities()` in share config file.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-02-03 20:31:03 +01:00
fenn-cs
61adb716fe Consider admin defaults when creating shares
The current share logic always uses the default `BUNDLED_PERMISSIONS.ALL`
which includes everything.

This commit updates share creation logic to use `defaultPermissions` if set
by admin for the creation of new shares.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-02-03 20:30:51 +01:00
Christopher Ng
d32abae55d fix(files_sharing): Return focus to trigger element on sharing details close
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-02-01 10:15:58 -08:00
Arthur Schiwon
a3d525b46d
Merge pull request #42779 from nextcloud/backport/42126/stable28
[stable28] Tooltip outside click, should abort share creation
2024-01-18 13:21:19 +01:00
John Molakvoæ
c1b95ab025 fix(files_sharing): fix sharing status indicator side after component update
Seems like the components now have max-height/width set too

Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-01-16 10:09:33 -06:00
fenn-cs
b5edb389bc
Allow user to finish typing date before formatting
Debounce `onExpirationChange` to avoid calling `formatDateToString`
on invalid on uncompletely inputed date strings.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-01-15 09:39:03 +01:00
fenn-cs
67e3367c48
Tooltip outside click, should abort share creation
It's unexpected that click outside a tooltip would proceed with the
 action that could be carried out inside the tooltip.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-01-15 09:39:03 +01:00
Simon L
c71d08cd4b sharing-entry__reshare needs ul or ol around it
Signed-off-by: Simon L <szaimen@e.mail.de>
2024-01-11 17:52:20 +00:00
John Molakvoæ
e4fdd24d2f
fix(files): group duplicate shares
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2024-01-11 15:42:56 +01:00
julia.kirschenheuter
aeaf69f124 Replace input filed with password field and added password error message
Remove unneeded NcDateTimePicker

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>

(cherry picked from commit 696545b530)
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
2023-12-20 11:22:48 -06:00
fenn-cs
8a67fc44c9 Remove newPassword from share model, if disabled
It's important to delete the `newPassword` prop from the share
 model, if the user unchecks the isPasswordProtected checkbox.

This clearer and allows for the unchecking to actually work as
`this.$set()` fails with the falsy value `''`.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-12-07 08:56:31 +01:00
fenn-cs
9c67ae4ec1 Create element reference inside $nextTick()
Accessing `this.$refs.shareList` outside $nextTick()
 could lead to the holder (`listComponent`) being undefined
 as the ref is yet to exist.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-12-07 08:56:31 +01:00
fenn-cs
efc385dc39 Improve share logic for enforced password & expiry date
* It's possible for the admin to enforce and expiry date after, some
 shares have been created. This commit makes possible to update the
 share with the new admin constraints.

* This commit would users to modify enforced expiry to anything within
 range and less than the enforced limit in the pre-create dialog for public
 shares.

* This commit fixes, unable to update share without updating password.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-11-30 12:41:06 +01:00
Jérôme Herbinet
a13ef9324f Replace "Update" with "Edit"
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
2023-11-23 13:13:24 +00:00
Julius Härtl
018cf71820 fix: Avoid invisible areas through keyboard navigation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-11-17 17:48:32 +00:00
julia.kirschenheuter
ff2ef8d0d6 Replace ActionLink with ActionButton on sharing tab
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
So-authored-by: Grigorii K. Shartsev <me@shgk.me>
2023-11-17 16:55:05 +01:00
Christopher Ng
6329da9352 fix(a11y): Focus on sharing quick permission radio
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-11-16 16:05:00 -08:00
julia.kirschenheuter
9d9fffb9d3 Move delete share button into the scrolling container
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
2023-11-15 17:11:10 +01:00
julia.kirschenheuter
7c987f0577
Adapt "advanced settings" button for accordion button
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
2023-11-15 09:08:55 +01:00
Julius Härtl
d7ae387713 fix: Change scroll container for sharing details
In order to meet accessibility requirements we cannot use a sticky
footer that overlaps important interactable content. Therefore this
moves to a scroll container for the details which does not include the
action buttons at the bottom.

Larger indentation change in SharingDetailsTab was required to have a
wrapping container for the scroll area.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-11-13 23:41:21 +01:00
Simon L
9d0cefd71d fix description of sharing toggle
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-07 12:17:42 +01:00
Grigorii K. Shartsev
aee73c060b fix(files_sharing): permissions translation
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
2023-11-06 18:40:21 +01:00
Christopher Ng
590daccca3 fix: Share select search globally icon
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-10-23 15:14:49 -07:00
fenn-cs
8dfcf2e02a Do not treat isDefaultExpireDateEnforced as fallback
`isDefaultExpireDateEnforced` and its corresponding `defaultExpirationDate`
is currently treated as the enforcement fallback when share type enforcements are not
set.

However, `isDefaultExpireDateEnforced` and `defaultExpirationDate` are actually more like
`isDefaultPublicExpireDateEnforced` and `defaultPublicExpirationDate` and therefore only applies
to public shares.

It might be ideal to rename this variables all the way from the backend config to the way we use
them in the frontend code.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-10-22 16:47:32 +00:00
fenn-cs
46308e96f3 Fix has expiration date logic
Current expiration date errorneously assumes that `defaultExpirationDate`
applies to all kinds of shares. But it only really applies to public shares despite
its name.

This commit, fixes that by paring expiration dates with the correct share types during
new share initialization and simplifying the `hasExpirationDate` (check) property.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-10-22 15:47:45 +01:00
fenn-cs
92417cd594 Check expiry enforcement for all share types
We should check that a maximum expiry date has been enforced for
all shares and NOT JUST FOR internal shares before enforcing a UI max date,
like in commit 9757e680e2

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-10-22 15:47:43 +01:00
Varun Patil
9bd50a7296
refactor: remove remaining usage of OC::getCapabilities
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2023-10-20 16:19:43 +02:00
julia.kirschenheuter
bfa7d33912 Reduce width of sharing entry
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-10-19 12:50:14 +00:00
fenn-cs
9757e680e2 Allow share expiry dates lower than enforced limits
Previously, users could change the share expiry date up
to the enforced maximum.

The new share flow imposed the enforced share expiry
date maximum literally and did not allow even dates
lower than the maximum enforced.

That does not make much sense, if the enforced expiry date is 30
days from creation date, then it's logical to allow users set the
date to anything less than 30 days from the creation date.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-10-16 07:03:53 +01:00
fenn-cs
10675f7aac Fixed mixed translations in sharing details
Due to a typo in the app passed to the translation method, some
strings translations don't work.

This commit corrects the spelling `file_sharing` to `files_sharing` and
hence resolves : https://github.com/nextcloud/server/issues/40801

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-10-09 17:39:48 +01:00
Christopher Ng
675feb9cf3 chore: Adapt to breaking DateTime rename
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-10-06 14:40:33 -07:00
Julien Veyssier
03cb99aff3
show loading icon in 'save share' button when creating a share
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-10-03 13:55:02 +02:00
fenn-cs
0537bbd331 Correct check for enabled expiration date
The default expiration date cannot be enforced if it is not enabled
in the first place. Hence, the check for whether a share has an expiration date
should not consider enforcements but only where the share expiry type is enabled.

For example : Using `this.config.isDefaultExpireDateEnabled` instead of
`this.config.isDefaultExpireDateEnforced` which can be verified by checking `isExpiryDateEnforced`.

Resolves : https://github.com/nextcloud/server/issues/40612

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-10-02 11:29:04 +00:00
fenn-cs
a092bae720 Updates to sharing flow
- Show enforced expiry date for new shares.
- Improve quick share dropdown visibility in dark mode.
- Prevent expiry date from showing expire for incoming shares.
by updating the check for `share.passwordExpirationTime` to equally
check for `undefined`.
- Move "Download permission/attribute" from custom setting (as it is just
another advanced setting and not an actual permission).
- Show correct text for upload/editing when "allow public uploads" is enabled
or disabled by admin.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-10-02 11:59:10 +01:00
Christopher Ng
eacde86693 enh(a11y): Add label to share note textbox
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-09-27 17:39:38 -07:00
fenn-cs
a3613350f6 Auto set password for new email shares
Suggest auto generated password for new public share (mail share).

Resolves : https://github.com/nextcloud/server/issues/40493

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-09-26 06:06:27 +00:00
John Molakvoæ (skjnldsv)
216804f83d
fix(files): title and inline actions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-09-21 15:20:17 +02:00
fenn-cs
56771b50c4 Consider share type for enforced share expiry dates
We have three kind of share expiry date enforcements.

- `isDefaultExpireDateEnforced`
- `isDefaultInternalExpireDateEnforced`
- `isDefaultRemoteExpireDateEnforced`

Before these commit, `isExpiryDateEnforced` that is used to
disable/enable the set expiry date checkbox does not take those into consideration
which is problematic as those have different applications.

In addition, this commit now uses `isExpiryDateEnforced` to disable/enable the input for
expiry date that shows up before the creation of link shares.

Here, `hasExpirationDate` is also removed from 'SharingEntryLink` component as it is
not used.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-09-20 16:43:12 +00:00
John Molakvoæ (skjnldsv)
fac5197486
feat(files): add files_sharing indicator
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2023-09-20 13:58:31 +02:00