Pass a version object into user::hasAppVersionModifyPermission() instead of
the integer that is the index of the version in the database.
This commit is contained in:
@@ -104,13 +104,12 @@ if ($_REQUEST['sub'])
|
||||
else if($_REQUEST['apptype'] == 'version')
|
||||
{
|
||||
/* make sure the user has permission to view this version */
|
||||
if(!$_SESSION['current']->hasAppVersionModifyPermission($_REQUEST['versionId']))
|
||||
$oVersion = new Version($_REQUEST['versionId']);
|
||||
if(!$_SESSION['current']->hasAppVersionModifyPermission($oVersion))
|
||||
{
|
||||
errorpage("Insufficient privileges.");
|
||||
exit;
|
||||
}
|
||||
|
||||
$oVersion = new Version($_REQUEST['versionId']);
|
||||
} else
|
||||
{
|
||||
//error no Id!
|
||||
|
||||
Reference in New Issue
Block a user