mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 16:03:02 +00:00
fix(collections): moving a place out of a list needs the same role as deleting it
Moving a saved place to another list takes it out of the source list, but updatePlace only asked for edit rights there, so an editor could empty a shared list they may not delete from. The source now takes owner or admin, like a delete, and the target still takes edit rights. REST and the update_collection_place tool share the service path. The Move to list action on desktop and phone follows the delete permission.
This commit is contained in:
@@ -383,7 +383,7 @@ export default function MCollections() {
|
||||
<button type="button" onClick={c.openCopyForSelection} disabled={c.selectedIds.length === 0} className={selectChip(c.selectedIds.length === 0)}>
|
||||
<Copy size={13} strokeWidth={2.2} /> {t('collections.copyToTrip')}
|
||||
</button>
|
||||
{c.canEdit && (
|
||||
{c.canDelete && (
|
||||
<button type="button" onClick={() => c.setListPickerMode('move')} disabled={c.selectedIds.length === 0} className={selectChip(c.selectedIds.length === 0)}>
|
||||
<FolderInput size={13} strokeWidth={2.2} /> {t('collections.moveToList')}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user