Permalink
Browse files

fix: update function signature for checkWriteAccess

  • Loading branch information...
themightychris committed Jan 8, 2019
1 parent aea642d commit 714f30e270dd27784c82f27f24d7e7ccdda8826e
@@ -44,7 +44,7 @@ protected static function onRecordSaved(ActiveRecord $Buzz, $requestData)
$Buzz->save();
}
public static function checkWriteAccess(ActiveRecord $ProjectUpdate, $suppressLogin = false)
public static function checkWriteAccess(ActiveRecord $ProjectUpdate = null, $suppressLogin = false)
{
// only allow creating, editing your own, and staff editing
if (!$ProjectUpdate->isPhantom && ($ProjectUpdate->CreatorID != $GLOBALS['Session']->PersonID) && !$GLOBALS['Session']->hasAccountLevel('Staff')) {
@@ -19,7 +19,7 @@ public static function handleBrowseRequest($options = [], $conditions = [], $res
return parent::handleBrowseRequest($options, $conditions, $responseID, $responseData);
}
public static function checkWriteAccess(\ActiveRecord $ProjectUpdate, $suppressLogin = false)
public static function checkWriteAccess(\ActiveRecord $ProjectUpdate = null, $suppressLogin = false)
{
// only allow creating, editing your own, and staff editing
if (!$ProjectUpdate->isPhantom && ($ProjectUpdate->CreatorID != $GLOBALS['Session']->PersonID) && !$GLOBALS['Session']->hasAccountLevel('Staff')) {

0 comments on commit 714f30e

Please sign in to comment.