Skip to content

Commit

Permalink
Only allow creators to log in
Browse files Browse the repository at this point in the history
  • Loading branch information
cypherix93 committed Mar 16, 2019
1 parent f38629a commit 272a9e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Repositories/Identity/AuthRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public async Task<ClaimsPrincipal> AuthenticateGoogleUser(GoogleLoginRequest log
using (var session = _store.OpenSession())
{
var user = await session.Query<User>()
.Where(u => u.Email == info.Email)
.Where(u => u.Email == info.Email && u.Roles.Contains(Role.Creator))
.FirstOrDefaultAsync();

// User doesn't exist, reject login
Expand Down

0 comments on commit 272a9e9

Please sign in to comment.