Backport pull request #8570 from jellyfin-web/release-12.z

Hide playlist move options from users without edit access

Original-merge: 88de8d5a9a

Merged-by: thornbill <thornbill@users.noreply.github.com>

Backported-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
gokulbits authored and Cody Robibero committed 2026-10-05 19:20:30 -04:00
1 parent e474957935
commit 40afc1b552
1 file changed
+15 -14
+15 -14
View File
@@ -306,28 +306,29 @@ export async function getCommands(options) {
});
}
// Only show playlist edit actions if the user can modify the playlist
if (item.PlaylistItemId && options.playlistId && options.canEditPlaylist) {
commands.push({
name: globalize.translate('RemoveFromPlaylist'),
id: 'removefromplaylist',
icon: 'playlist_remove'
});
}
if (item.PlaylistItemId && options.playlistId && item.PlaylistIndex > 0) {
commands.push({
name: globalize.translate('MoveToTop'),
id: 'movetotop',
icon: 'vertical_align_top'
});
}
if (item.PlaylistIndex > 0) {
commands.push({
name: globalize.translate('MoveToTop'),
id: 'movetotop',
icon: 'vertical_align_top'
});
}
if (item.PlaylistItemId && options.playlistId && item.PlaylistIndex < (item.PlaylistItemCount - 1)) {
commands.push({
name: globalize.translate('MoveToBottom'),
id: 'movetobottom',
icon: 'vertical_align_bottom'
});
if (item.PlaylistIndex < (item.PlaylistItemCount - 1)) {
commands.push({
name: globalize.translate('MoveToBottom'),
id: 'movetobottom',
icon: 'vertical_align_bottom'
});
}
}
if (options.collectionId) {