Added the ability for admins to edit the owner of a track via the edit track interface

This commit is contained in:
Robbt 2019-03-05 10:00:54 -05:00
parent d020551740
commit 009fb49a6a
4 changed files with 56 additions and 31 deletions

View file

@ -364,6 +364,7 @@ class LibraryController extends Zend_Controller_Action
{
$user = Application_Model_User::getCurrentUser();
$isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
$isAdmin = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN));
$request = $this->getRequest();
@ -380,6 +381,10 @@ class LibraryController extends Zend_Controller_Action
$form->removeActionButtons();
$this->view->permissionDenied = true;
}
// only admins should be able to edit the owner of a file
if (!$isAdmin) {
$form->removeOwnerEdit();
}
if ($request->isPost()) {