Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
57997fef
Unverified
Commit
57997fef
authored
5 years ago
by
Greta Doci
Committed by
John Molakvoæ (skjnldsv)
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add create and delete checkbox for sharesidebar
Signed-off-by:
Greta Doci
<
gretadoci@gmail.com
>
parent
aa46fc26
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files_sharing/src/components/SharingEntry.vue
+48
-5
48 additions, 5 deletions
apps/files_sharing/src/components/SharingEntry.vue
with
48 additions
and
5 deletions
apps/files_sharing/src/components/SharingEntry.vue
+
48
−
5
View file @
57997fef
...
...
@@ -40,15 +40,31 @@
{{
t
(
'
files_sharing
'
,
'
Allow editing
'
)
}}
</ActionCheckbox>
<!-- create permission -->
<ActionCheckbox
ref=
"canCreate"
:checked.sync=
"canCreate"
:value=
"permissionsCreate"
:disabled=
"saving"
>
{{
t
(
'
files_sharing
'
,
'
Allow creating
'
)
}}
</ActionCheckbox>
<!-- reshare permission -->
<ActionCheckbox
ref=
"canReshare"
:checked.sync=
"canReshare"
:value=
"permissionsShare"
:disabled=
"saving"
>
{{
t
(
'
files_sharing
'
,
'
Can
reshar
e
'
)
}}
{{
t
(
'
files_sharing
'
,
'
Allow
reshar
ing
'
)
}}
</ActionCheckbox>
<!-- delete permission -->
<ActionCheckbox
ref=
"canDelete"
:checked.sync=
"canDelete"
:value=
"permissionsDelete"
:disabled=
"saving"
>
{{
t
(
'
files_sharing
'
,
'
Allow deleting
'
)
}}
</ActionCheckbox>
<!-- expiration date -->
<ActionCheckbox
:checked.sync=
"hasExpirationDate"
:disabled=
"config.isDefaultExpireDateEnforced || saving"
...
...
@@ -142,6 +158,8 @@ export default {
data
()
{
return
{
permissionsEdit
:
OC
.
PERMISSION_UPDATE
,
permissionsCreate
:
OC
.
PERMISSION_CREATE
,
permissionsDelete
:
OC
.
PERMISSION_DELETE
,
permissionsRead
:
OC
.
PERMISSION_READ
,
permissionsShare
:
OC
.
PERMISSION_SHARE
,
}
...
...
@@ -197,7 +215,31 @@ export default {
return
this
.
share
.
hasUpdatePermission
},
set
:
function
(
checked
)
{
this
.
updatePermissions
(
checked
,
this
.
canReshare
)
this
.
updatePermissions
({
isEditChecked
:
checked
})
},
},
/**
* Can the sharee create the shared file ?
*/
canCreate
:
{
get
:
function
()
{
return
this
.
share
.
hasCreatePermission
},
set
:
function
(
checked
)
{
this
.
updatePermissions
({
isCreateChecked
:
checked
})
},
},
/**
* Can the sharee delete the shared file ?
*/
canDelete
:
{
get
:
function
()
{
return
this
.
share
.
hasDeletePermission
},
set
:
function
(
checked
)
{
this
.
updatePermissions
({
isDeleteChecked
:
checked
})
},
},
...
...
@@ -209,7 +251,7 @@ export default {
return
this
.
share
.
hasSharePermission
},
set
:
function
(
checked
)
{
this
.
updatePermissions
(
this
.
canEdit
,
checked
)
this
.
updatePermissions
(
{
isReshareChecked
:
checked
}
)
},
},
...
...
@@ -238,9 +280,11 @@ export default {
},
methods
:
{
updatePermissions
(
isEditChecked
,
isReshareChecked
)
{
updatePermissions
(
{
isEditChecked
=
this
.
canEdit
,
isCreateChecked
=
this
.
canCreate
,
isDeleteChecked
=
this
.
canDelete
,
isReshareChecked
=
this
.
canReshare
}
=
{}
)
{
// calc permissions if checked
const
permissions
=
this
.
permissionsRead
|
(
isCreateChecked
?
this
.
permissionsCreate
:
0
)
|
(
isDeleteChecked
?
this
.
permissionsDelete
:
0
)
|
(
isEditChecked
?
this
.
permissionsEdit
:
0
)
|
(
isReshareChecked
?
this
.
permissionsShare
:
0
)
...
...
@@ -248,7 +292,6 @@ export default {
this
.
queueUpdate
(
'
permissions
'
)
},
},
}
</
script
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment