-
Notifications
You must be signed in to change notification settings - Fork 3
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
#82 - Authenticate with discord #77
#82 - Authenticate with discord #77
Conversation
Clean up orbat view (ARCOMM#42)
if (!auth()->guest()) { | ||
if (is_null(auth()->user()->discord_id)) { | ||
auth()->user()->discord_id = $user->id; | ||
auth()->user()->save(); | ||
return redirect('/hub'); | ||
} | ||
} |
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.
For migrating existing users
$user = User::where('steam_id', $data->id)->first(); | ||
|
||
if (is_null($user)) { | ||
return [ | ||
'error' => 'Account not found.' | ||
]; |
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.
This will only login existing users - new users can't authenticate with steam
$user = User::findOrFail($request->user_id); | ||
|
||
return $this->update($request, $user); | ||
// |
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.
Why comment out these functions?
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.
These were used by admins in the User display to update permissions
Now that permissions are handled through Discord roles the ability to update permissions through the site was removed
The reason that I've left the functions there, but with no functionality, is I believe User is defined as a REST resource (so should implement CRUD methods)
lgtm Plans for release:
|
No description provided.