Skip to content

Commit

Permalink
feat: allow 1638882 to access sector
Browse files Browse the repository at this point in the history
  • Loading branch information
xfoxfu committed Sep 25, 2024
1 parent 34a3eaa commit 24a444a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Net.Vatprc.Uniapi/Controllers/SectorController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ public async Task<SectorPermissionResponse> GetPermission()
{
var user = await DbContext.User.FindAsync(this.GetUserId()) ??
throw new ApiError.UserNotFound(this.GetUserId());

// FIXME: This is a temporary solution to allow the user to access the sector
if (user.Cid == "1638882")
{
return new SectorPermissionResponse(true);
}

var controllers = await VatsimService.GetAtcList();
var atc = controllers.FirstOrDefault(c => c.Id.ToString() == user.Cid);
if (atc == null)
Expand Down

0 comments on commit 24a444a

Please sign in to comment.