Commit 529d3ee7 authored by Mike Sheldon's avatar Mike Sheldon

Fix displaying errors for album/artist/track editing auth failure

parent a5d935d0
......@@ -26,6 +26,14 @@ require_once('data/Album.php');
$artist = new Artist(urldecode($_GET['artist']));
if(!isset($this_user) || !$this_user->manages($artist->name)) {
$smarty->assign('pageheading', 'Permission denied');
$smarty->assign('error', 'You don\'t have permission to edit this artist\'s details.');
$smarty->display('error.tpl');
die();
}
$smarty->assign('artist', $artist);
$smarty->assign('pageheading', '<a href="' . $artist->getURL() . '">' . $artist->name . '</a> &mdash; Add Album');
......
......@@ -38,6 +38,7 @@ try {
if(!isset($this_user) || !$this_user->manages($artist->name)) {
$smarty->assign('pageheading', 'Permission denied');
$smarty->assign('error', 'You don\'t have permission to edit this artist\'s details.');
$smarty->display('error.tpl');
die();
}
......
......@@ -32,6 +32,7 @@ $album = new Album(urldecode($_GET['album']), $artist->name);
if(!isset($this_user) || !$this_user->manages($artist->name)) {
$smarty->assign('pageheading', 'Permission denied');
$smarty->assign('error', 'You don\'t have permission to edit this artist\'s details.');
$smarty->display('error.tpl');
die();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment