Permalink
Browse files

fix: update function signature for checkWriteAccess

  • Loading branch information...
themightychris committed Jan 8, 2019
1 parent 278effc commit 9cbf9030e0f4981c1310a439b451b9165826a487
@@ -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 9cbf903

Please sign in to comment.