+ /**
+ * Check the current user's permissions against an ownable item.
+ * @param $permission
+ * @param Ownable $ownable
+ * @return bool
+ */
+ protected function checkOwnablePermission($permission, Ownable $ownable)
+ {
+ if (userCan($permission, $ownable)) return true;
+ return $this->showPermissionError();
+ }
+
+ /**
+ * Check if a user has a permission or bypass if the callback is true.
+ * @param $permissionName
+ * @param $callback
+ * @return bool
+ */