Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

Commit

Permalink
Hide widgets when not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
bjuppa committed Oct 4, 2018
1 parent 5683853 commit db07a14
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Widgets/ItemHistoryWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function addEntry(string $action, \DateTime $datetime, AdminUser $user =
$this->entries->push(compact('action', 'datetime', 'user'));
return $this;
}

public function addCreatedEntry(\DateTime $datetime, AdminUser $user = null): ItemHistoryWidgetContract
{
return $this->addEntry('created', $datetime, $user);
Expand All @@ -45,6 +45,6 @@ public function addUpdatedEntry(\DateTime $datetime, AdminUser $user = null): It

public function isAuthorized(Authorizable $user = null): bool
{
return true;
return (bool) $user;
}
}
2 changes: 1 addition & 1 deletion src/Widgets/MenuWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public function getHeadings(): Collection

public function isAuthorized(Authorizable $user = null): bool
{
return true;
return (bool) $user;
}
}
2 changes: 1 addition & 1 deletion src/Widgets/PersonalRecentVisitsWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function toHtml()

public function isAuthorized(Authorizable $user = null): bool
{
return true;
return (bool) $user;
}

private function getVisits()
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/TeamRecentVisitsWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function toHtml()

public function isAuthorized(Authorizable $user = null): bool
{
return true;
return (bool) $user;
}

private function getVisits()
Expand Down

0 comments on commit db07a14

Please sign in to comment.