-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sharing capabilities between users
- Loading branch information
Showing
19 changed files
with
405 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.typeahead-item img { | ||
width: 3rem; | ||
height: 3rem; | ||
} |
22 changes: 16 additions & 6 deletions
22
Westmoor.DowntimePlanner/ClientApp/src/app/ownership/ownership.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Westmoor.DowntimePlanner.Responses; | ||
using Westmoor.DowntimePlanner.Services; | ||
|
||
namespace Westmoor.DowntimePlanner.Controllers | ||
{ | ||
[ApiController] | ||
[Route("api/v1/[controller]")] | ||
[Authorize(Policy = Policies.ReadUsers)] | ||
public class UserController : ControllerBase | ||
{ | ||
private readonly IUserService _service; | ||
|
||
public UserController(IUserService service) | ||
{ | ||
_service = service; | ||
} | ||
|
||
[HttpGet("{email}")] | ||
public async Task<UserResponse[]> SearchByEmailAsync(string email) => | ||
await _service.SearchByEmailAsync(email); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Westmoor.DowntimePlanner.Entities | ||
{ | ||
public class OauthTokenEntity | ||
{ | ||
[JsonPropertyName("access_token")] | ||
public string AccessToken { get; set; } | ||
|
||
[JsonPropertyName("token_type")] | ||
public string TokenType { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Westmoor.DowntimePlanner.Entities | ||
{ | ||
public class UserEntity | ||
{ | ||
[JsonPropertyName("user_id")] | ||
public string UserId { get; set; } | ||
|
||
[JsonPropertyName("email")] | ||
public string Email { get; set; } | ||
|
||
[JsonPropertyName("picture")] | ||
public string Picture { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("user_metadata")] | ||
public UserMetadataEntity UserMetadata { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Westmoor.DowntimePlanner.Entities | ||
{ | ||
public class UserMetadataEntity | ||
{ | ||
[JsonPropertyName("ownership_id")] | ||
public string OwnershipId { get; set; } | ||
|
||
[JsonPropertyName("campaigns")] | ||
public string[] Campaigns { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.