Skip to content

Commit 366d387

Browse files
committed
corrected so new applications appear directly
1 parent a511387 commit 366d387

File tree

4 files changed

+3
-39
lines changed

4 files changed

+3
-39
lines changed

src/Server/Coderr.Server.Api/IRequiresPrincipal.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/Server/Coderr.Server.Api/IUpdatesPrincipal.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/Server/Coderr.Server.App/Core/Applications/CommandHandlers/CreateApplicationHandler.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,7 @@ await _repository.CreateAsync(new ApplicationTeamMember(app.Id, creator.AccountI
4141
Roles = new[] {ApplicationRole.Admin, ApplicationRole.Member},
4242
});
4343

44-
var identity = context.Principal.Identities.First();
45-
var claim = new Claim(CoderrClaims.Application, app.Id.ToString(), ClaimValueTypes.Integer32);
46-
identity.AddClaim(claim);
47-
claim = new Claim(CoderrClaims.ApplicationAdmin, app.Id.ToString(), ClaimValueTypes.Integer32);
48-
identity.AddClaim(claim);
49-
claim = new Claim(CoderrClaims.ApplicationName, app.Name, ClaimValueTypes.String);
50-
identity.AddClaim(claim);
51-
identity.AddClaim(CoderrClaims.UpdateIdentity);
44+
// WebProject redirects to update all credentials
5245

5346
var evt = new ApplicationCreated(app.Id, app.Name, command.UserId, command.ApplicationKey, app.SharedSecret);
5447
await context.SendAsync(evt);

src/Server/Coderr.Server.Web/Controllers/WizardController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public async Task<ActionResult> Application(ApplicationViewModel model)
5959
await _messageBus.SendAsync(this.ClaimsUser(), app);
6060
await Task.Delay(100);//ugly!
6161

62-
return RedirectToAction("Packages", new {appKey = app.ApplicationKey});
62+
var returnUrl = Url.Action("Packages", new {appKey = app.ApplicationKey});
63+
return RedirectToAction("UpdateSession", "Account", new {returnUrl});
6364
}
6465

6566

0 commit comments

Comments
 (0)