Skip to content

Commit

Permalink
Small corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Aug 16, 2022
1 parent 3d8a11d commit 57271fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@ export default defineComponent({
return LinkShareRoles.filterByBitmask(
parseInt(this.share.permissions),
this.highlightedFile.isFolder,
this.hasPublicLinkEditing
this.hasPublicLinkEditing,
!!link.password
)
}
Expand Down
11 changes: 8 additions & 3 deletions packages/web-client/src/helpers/share/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,17 @@ export abstract class LinkShareRoles {
* @param bitmask
* @param isFolder
* @param canEditFile
* @param hasPassword
*/
static filterByBitmask(bitmask: number, isFolder: boolean, canEditFile = false): ShareRole[] {
static filterByBitmask(
bitmask: number,
isFolder: boolean,
canEditFile = false,
hasPassword = false
): ShareRole[] {
return [
...this.all,
linkRoleInternalFile,
linkRoleInternalFolder,
...(!hasPassword ? [linkRoleInternalFile, linkRoleInternalFolder] : []),
...(canEditFile ? [linkRoleEditorFile] : [])
].filter((r) => {
return r.folder === isFolder && bitmask === (bitmask | r.bitmask(false))
Expand Down
4 changes: 2 additions & 2 deletions packages/web-runtime/src/pages/resolvePublicLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<p v-if="loadTokenInfoTask.isError" class="oc-text-lead">
{{ loadTokenInfoTask.last.error }}
</p>
<p v-if="loadTokenInfoTask.isError" class="oc-text-lead">
{{ loadTokenInfoTask.last.error }}
<p v-if="isPasswordRequiredTask.isError" class="oc-text-lead">
{{ isPasswordRequiredTask.last.error }}
</p>
</div>
</template>
Expand Down

0 comments on commit 57271fb

Please sign in to comment.