Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Merge requests
!597
Prevent non allowed metadata deletion
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Prevent non allowed metadata deletion
delete-allowed-meta-only
into
master
Overview
2
Commits
3
Pipelines
0
Changes
3
All threads resolved!
Hide all comments
Merged
Valentin Rigal
requested to merge
delete-allowed-meta-only
into
master
5 years ago
Overview
2
Commits
3
Pipelines
0
Changes
3
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
548388ab
3 commits,
5 years ago
3 files
+
40
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
arkindex/documents/api/elements.py
+
4
−
0
Options
@@ -814,6 +814,10 @@ class MetadataEdit(RetrieveUpdateDestroyAPIView):
if
Right
.
Write
not
in
obj
.
element
.
corpus
.
get_acl_rights
(
request
.
user
):
self
.
permission_denied
(
request
,
message
=
'
You do not have write access to this corpus.
'
)
def
perform_destroy
(
self
,
instance
):
serializer
=
self
.
get_serializer
(
instance
)
serializer
.
delete
(
instance
)
class
AllowedMetaDataPagination
(
PageNumberPagination
):
page_size
=
200
Loading