[GH-ISSUE #37] Enable "Global" user visibility? #22

Closed
opened 2026-02-27 09:12:38 +03:00 by kerem · 2 comments
Owner

Originally created by @kwri-avongluck on GitHub (Sep 24, 2020).
Original GitHub issue: https://github.com/maelstrom-cms/odin/issues/37

Is there a way to enable "global" visibility of checks between users?
A website check created by User A is not visible to User B.

Originally created by @kwri-avongluck on GitHub (Sep 24, 2020). Original GitHub issue: https://github.com/maelstrom-cms/odin/issues/37 Is there a way to enable "global" visibility of checks between users? A website check created by User A is not visible to User B.
kerem closed this issue 2026-02-27 09:12:38 +03:00
Author
Owner

@OwenMelbz commented on GitHub (Sep 24, 2020):

Hi,

This to me sounds a bit like "Teams" functionality.

But you could try removing the scoping here: https://github.com/maelstrom-cms/odin/blob/master/app/Website.php#L48

So it applies a "where" on user_id, you could try removing that and seeing what happens.

I'm going to close this ticket as it's not a bug just a request :)

<!-- gh-comment-id:698597536 --> @OwenMelbz commented on GitHub (Sep 24, 2020): Hi, This to me sounds a bit like "Teams" functionality. But you could try removing the scoping here: https://github.com/maelstrom-cms/odin/blob/master/app/Website.php#L48 So it applies a "where" on user_id, you could try removing that and seeing what happens. I'm going to close this ticket as it's not a bug just a request :)
Author
Owner

@kwri-avongluck commented on GitHub (Sep 24, 2020):

yup! Thanks!

For any future onlookers:

diff --git a/app/Website.php b/app/Website.php
index 93a86ad..7a18692 100644
--- a/app/Website.php
+++ b/app/Website.php
@@ -45,9 +45,7 @@ class Website extends Model
             if ($request->filled('key')) {
                 $builder->where('cron_key', $request->input('key'));
             } elseif (!app()->runningInConsole()) {
-                if (auth()->check()) {
-                    $builder->where('user_id', auth()->id());
-                } else {
+                if (!auth()->check()) {
                     $builder->where('user_id', '-1');
                 }
             }
<!-- gh-comment-id:698600046 --> @kwri-avongluck commented on GitHub (Sep 24, 2020): yup! Thanks! For any future onlookers: ```diff diff --git a/app/Website.php b/app/Website.php index 93a86ad..7a18692 100644 --- a/app/Website.php +++ b/app/Website.php @@ -45,9 +45,7 @@ class Website extends Model if ($request->filled('key')) { $builder->where('cron_key', $request->input('key')); } elseif (!app()->runningInConsole()) { - if (auth()->check()) { - $builder->where('user_id', auth()->id()); - } else { + if (!auth()->check()) { $builder->where('user_id', '-1'); } } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/odin-maelstrom-cms#22
No description provided.