Skip to content

Commit

Permalink
Another CI run
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed Apr 20, 2022
1 parent e8638f3 commit 7dae91a
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export default {
},
expirationDate: {
type: Object,
default: () => {},
required: false
},
passwordEnforced: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<oc-button
:id="`edit-public-link-role-dropdown-toggl-${link.id}`"
appearance="raw"
class="oc-text-left"
class="edit-public-link-role-dropdown-toggl oc-text-left"
gap-size="none"
>
<span class="oc-invisible-sr" v-text="linkRole" />
Expand All @@ -21,6 +21,7 @@
<oc-list class="roleDropdownList">
<li v-for="(descriptor, i) in availableRoleOptions" :key="`role-dropdown-${i}`">
<oc-button
:id="`files-role-${descriptor.label.toLowerCase()}`"
:class="{ selected: parseInt(link.permissions) === descriptor.role.bitmask(false) }"
appearance="raw"
justify-content="space-between"
Expand Down Expand Up @@ -54,6 +55,7 @@
<oc-button
v-if="link.indirect"
v-oc-tooltip="viaTooltip"
:area-label="viaTooltip"
type="router-link"
class="oc-files-file-link-via"
appearance="raw"
Expand Down Expand Up @@ -146,6 +148,7 @@ export default {
},
expirationDate: {
type: Object,
default: () => {},
required: false
},
isFolderShare: {
Expand Down Expand Up @@ -374,6 +377,7 @@ export default {
this.createModal(modal)
},
showPasswordModal() {
// needs to check if password is enforced to prevent from "remove through edit with empty input field"
const modal = {
variation: 'passive',
title: this.link.password ? this.$gettext('Edit password') : this.$gettext('Add password'),
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "ownCloud web runtime",
"license": "AGPL-3.0",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"@fortawesome/fontawesome-free": "^6.1.1",
"@popperjs/core": "^2.4.0",
"@vue/composition-api": "^1.4.9",
"axios": "^0.26.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ Feature: Create public link shares
When the user creates a new public link for file "lorem.txt" using the webUI
And the user opens folder "simple-folder" using the webUI
And the user creates a new public link for file "lorem.txt" using the webUI
And the user browses to the shared-via-link page using the webUI
# using the webui to navigate creates a problem because "successfully created link" notifications block the nav
And the user has browsed to the shared-via-link page
Then file with path "lorem.txt" should be listed on the webUI
And file with path "simple-folder/lorem.txt" should be listed on the webUI





Scenario: user creates a multiple public link of a file and delete the first link
Given user "Alice" has created file "lorem.txt" in the server
And user "Alice" has created a public link with following settings in the server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,45 +58,45 @@ Feature: Edit public link shares
| read, update, create, delete | shareapi_enforce_links_password_read_write_delete |
| create | shareapi_enforce_links_password_write_only |

@issue-ocis-1328
Scenario Outline: user changes the role of an existing public link role without entering share password while enforce password for the original role is enforced
Given the setting "<setting-name>" of app "core" has been set to "yes" in the server
And user "Alice" has created folder "simple-folder" in the server
And user "Alice" has created a public link with following settings in the server
| path | simple-folder |
| name | Public-link |
| permissions | <initial-permissions> |
| password | 123 |
And user "Alice" has logged in using the webUI
When the user edits the public link named "Public-link" of folder "simple-folder" changing following
| role | <role> |
| password | |
Then user "Alice" should have a share with these details in the server:
| field | value |
| share_type | public_link |
| uid_owner | Alice |
| permissions | <expected-permissions> |
| path | /simple-folder |
Examples:
| initial-permissions | role | setting-name | expected-permissions |
| read | Contributor | shareapi_enforce_links_password_read_only | read, create |
| read, create | Viewer | shareapi_enforce_links_password_read_write | read |
| read, update, create, delete | Uploader | shareapi_enforce_links_password_read_write_delete | create |
| create | Editor | shareapi_enforce_links_password_write_only | read, update, create, delete |

@issue-ocis-1328
Scenario: user edits a public link and does not save the changes
Given the setting "shareapi_allow_public_notification" of app "core" has been set to "yes" in the server
And user "Alice" has created folder "simple-folder" in the server
And user "Alice" has created a public link with following settings in the server
| path | simple-folder |
| name | test_public_link |
| password | pass123 |
And user "Alice" has logged in using the webUI
When the user edits the public link named "test_public_link" of folder "simple-folder" changing following but not saving
| password | qwertyui |
And the public uses the webUI to access the last public link created by user "Alice" with password "qwertyui" in a new session
Then the public should not get access to the publicly shared file







































Scenario: user edits a name of an already existing public link
Given user "Alice" has created folder "simple-folder" in the server
Expand Down Expand Up @@ -166,8 +166,7 @@ Feature: Edit public link shares
| name | Public-link |
| permissions | read |
And user "Alice" has logged in using the webUI
When the user edits the public link named "Public-link" of folder "simple-folder" changing following
| role | Editor |
When the user tries to edit the public link named "Public-link" of folder "simple-folder" changing the role to "Editor"
And the public uses the webUI to access the last public link created by user "Alice" in a new session
And the user deletes the following elements using the webUI
| name |
Expand All @@ -176,6 +175,7 @@ Feature: Edit public link shares
Then the deleted elements should not be listed on the webUI
And the deleted elements should not be listed on the webUI after a page reload


@issue-ocis-reva-389
Scenario: user removes the public link of a file using webUI
Given user "Alice" has created file "lorem.txt" in the server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ Feature: Share by public link
| name | Public link |
| expireDate | 2038-10-14 |
And user "Alice" has logged in using the webUI
When the user edits the public link named "Public link" of file "lorem.txt" changing following
| expireDate | 2038 July 21 |
When the user edits the public link named "Public link" of file "lorem.txt" changing expireDate to "2038 July 21"
Then the last public link share response of user "Alice" should include the following fields in the server
| expireDate | 2038-07-21 |

Expand All @@ -32,6 +31,7 @@ Feature: Share by public link




@issue-ocis-1328
Scenario Outline: auto set expiration date on public link (with default amount of expiry days)
Given the setting "shareapi_default_expire_date" of app "core" has been set to "yes" in the server
Expand Down Expand Up @@ -114,9 +114,7 @@ Feature: Share by public link
| expireDate | +16 |
And user "Alice" has logged in using the webUI
And the setting "shareapi_expire_after_n_days" of app "core" has been set to "7" in the server
When the user edits the public link named "Public link" of file "lorem.txt" changing following
| expireDate | +15 |
Then the user should see an error message on the public link share dialog saying "Cannot set expiration date more than 7 days in the future"
When the user edits the public link named "Public link" of file "lorem.txt" changing expireDate to "+15"
And user "Alice" should have a share with these details in the server:
| field | value |
| share_type | public_link |
Expand All @@ -126,6 +124,7 @@ Feature: Share by public link
| name | Public link |
| expiration | +16 |


@issue-ocis-1328
Scenario: user can set an expiry date when creating a public link to a date that is before the enforced max expiry date
Given the setting "shareapi_default_expire_date" of app "core" has been set to "yes" in the server
Expand Down Expand Up @@ -153,8 +152,7 @@ Feature: Share by public link
| name | Public link |
| expireDate | +5 |
And user "Alice" has logged in using the webUI
When the user edits the public link named "Public link" of file "lorem.txt" changing following
| expireDate | +7 |
When the user edits the public link named "Public link" of file "lorem.txt" changing expireDate to "+7"
Then user "Alice" should have a share with these details in the server:
| field | value |
| share_type | public_link |
Expand Down
Loading

0 comments on commit 7dae91a

Please sign in to comment.