-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow CompanyableTrait trait on users #14801
Conversation
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
PR Summary
|
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
One thing I'm seeing here in the tests that I'm unsure about is that I'm getting:
But I can't tell what's causing that warning. |
Signed-off-by: snipe <[email protected]>
@snipe I tracked it down. That |
(I only looked into the test issues so far. Going to give it a full review soon.) |
Omg, first, thank you, second fml |
I don't even see a |
Nevermind, I'm an idiot lol |
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this touches the API controller can we add tests for that as well? I think it would have caught the missing ->find()
I mentioned below.
It'll be good to catch up to develop so the test is in the correct directory too 😄 (#14825)
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
This should allow us to automatically scope users to company instead of having to manually do it. Previously, adding the
use CompanyableTrait;
statement would get caught in an infinite loop, sinceAuth::check()
internally callsAuth::user()
, which makes the scope get caught on which user you want to be looking at for scoping.Using
Auth::hasUser()
just returns the boolean value, which prevents this looping problem.To test