Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions WebService/Controllers/GalliumController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,25 @@ public class GalliumController : ControllerBase
/// </summary>
public new User? User => this.FindContextItem<User>("User");

[NonAction]
public User RequireUser() => this.User
?? throw new MissingIdentificationException("Cette action requiert un utilisateur.");

/// <summary>
/// La session de l'utilisateur qui a émis la requête actuelle.
/// </summary>
public Session? Session => this.FindContextItem<Session>("Session");


[NonAction]
public Session RequireSession() => this.Session
?? throw new MissingIdentificationException("Cette action requiert une session active.");

/// <summary>
/// L'application depuis laquelle la requête actuelle a été émise.
/// </summary>
public Client? Client => this.FindContextItem<Client>("Client");


[NonAction]
public Client RequireClient() => this.Client
?? throw new MissingIdentificationException("Cette action requiert une session active.");

Expand Down
2 changes: 1 addition & 1 deletion WebService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
app.UseAuthorization();
app.MapControllers();

ServerInfo.Current.SetVersion(1, 4, 0, "beta");
ServerInfo.Current.SetVersion(1, 4, 1, "beta");
Console.WriteLine(ServerInfo.Current);

#if !FAKE_DB
Expand Down