Skip to content

Commit

Permalink
Adapt wording, change role name
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Sep 13, 2022
1 parent c5daa79 commit ccca2e4
Show file tree
Hide file tree
Showing 5 changed files with 197 additions and 181 deletions.
7 changes: 0 additions & 7 deletions packages/web-app-files/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,12 @@ import Mixins from './mixins'
import { mapActions, mapState } from 'vuex'
import SideBar from './components/SideBar/SideBar.vue'
import { defineComponent } from '@vue/composition-api'
import { usePublicLinkPassword, useStore } from 'web-pkg/src/composables'
export default defineComponent({
components: {
SideBar
},
mixins: [Mixins],
setup() {
const store = useStore()
return {
publicLinkPassword: usePublicLinkPassword({ store })
}
},
computed: {
...mapState('Files/sidebar', {
sidebarClosed: 'closed',
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/helpers/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export function buildSharedResource(
resource.canShare = () => true
resource.canRename = () => true
resource.canBeDeleted = () => true
resource.canDeny = () => SharePermissions.deny.enabled(share.permissions)
resource.canDeny = () => SharePermissions.denied.enabled(share.permissions)
}

resource.extension = extractExtensionFromFile(resource)
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/helpers/share/permission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export abstract class SharePermissions {

static readonly share = new SharePermission('share', SharePermissionBit.Share, $gettext('Share'))

static readonly deny = new SharePermission('deny', 64, $gettext('Deny'))
static readonly denied = new SharePermission('denied', 64, $gettext('Deny'))

static permissionsToBitmask(permissions: SharePermission[]): number {
return (permissions || []).reduce((b: number, p: SharePermission) => b | p.bit, 0)
Expand Down
18 changes: 11 additions & 7 deletions packages/web-app-files/src/helpers/share/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ export const peopleRoleCustomFolder = new CustomShareRole(
]
)
export const peopleRoleDenyFolder = new PeopleShareRole(
'deny',
'denied',
true,
$gettext('Deny'),
$gettext('deny'),
[SharePermissions.deny]
$gettext('No access'),
$gettext('no access'),
[SharePermissions.denied]
)
export const linkRoleViewerFile = new LinkShareRole(
'viewer',
Expand Down Expand Up @@ -221,9 +221,13 @@ export const linkRoleUploaderFolder = new LinkShareRole(
$gettext('uploader'),
[SharePermissions.create]
)
export const spaceRoleDeny = new SpaceShareRole('deny', false, $gettext('Deny'), $gettext('deny'), [
SharePermissions.deny
])
export const spaceRoleDeny = new SpaceShareRole(
'denied',
false,
$gettext('Deny'),
$gettext('deny'),
[SharePermissions.denied]
)
export const spaceRoleViewer = new SpaceShareRole(
'viewer',
false,
Expand Down
Loading

0 comments on commit ccca2e4

Please sign in to comment.