Pin nixpkgs to the revision used by itc.componentware: the channel version ships a latexminted that crashes on Python 3.14, which made every listing fail and sent latexmk into an endless error prompt. Also force nonstopmode/halt-on-error so a broken listing can never loop again.
26 lines
863 B
C#
26 lines
863 B
C#
// Houston/Auth/HoustonRoles.cs
|
|
public static readonly string DocumentsView = "Documents.View";
|
|
|
|
// Houston/Program.cs
|
|
var viewDocumentsPolicy = "CanViewDocuments";
|
|
|
|
builder.Services.AddAuthorization(o =>
|
|
{
|
|
o.FallbackPolicy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
|
|
// ...
|
|
o.AddPolicy(viewDocumentsPolicy, policy => policy.RequireRole(HoustonRoles.DocumentsView));
|
|
});
|
|
|
|
builder.Services.AddRazorPages(o =>
|
|
{
|
|
// ...
|
|
o.Conventions.AllowAnonymousToPage("/Document/Share");
|
|
o.Conventions.AuthorizeFolder("/Document", viewDocumentsPolicy);
|
|
o.Conventions.AuthorizePage("/Documents", viewDocumentsPolicy);
|
|
});
|
|
|
|
// Houston/Services registrations
|
|
builder.Services.AddOptions<DocumentsSettings>().BindConfiguration("Documents");
|
|
builder.Services.AddDocumentsClient();
|
|
builder.Services.AddScoped<DocumentsService>();
|