You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% TODO add activation page
%
%! http:status_page(+Term, +Context, -HTML)
%
% Provide a custom error page for the forbidden action.
http:status_page(forbidden(Path), Context, HTML) :-
phrase(page([ title(\local('Access denied'))
],
[ h1(\local('Access denied')),
p([\local('You do not have sufficient privileges to access '),
Path]),
\forbidden_reason(Context)
]),
HTML).
forbidden_reason(Context) -->
{ memberchk(no_role(User, Role), Context) },
html(p(\local('The user ~p does not have role ~p'-[User,Role]))).
forbidden_reason(Context) -->
{ memberchk(needs_activation(User), Context) },
html([p(\local('The user ~p needs to activate their account'-[User])),
a(href(location_by_id(login(resend/User))), \local('Resend activation email'))]).
The text was updated successfully, but these errors were encountered:
Jan made the status page customizable.
% TODO add activation page
%
%! http:status_page(+Term, +Context, -HTML)
%
% Provide a custom error page for the forbidden action.
http:status_page(forbidden(Path), Context, HTML) :-
phrase(page([ title(\local('Access denied'))
],
[ h1(\local('Access denied')),
p([\local('You do not have sufficient privileges to access '),
Path]),
\forbidden_reason(Context)
]),
HTML).
forbidden_reason(Context) -->
{ memberchk(no_role(User, Role), Context) },
html(p(\local('The user ~p does not have role ~p'-[User,Role]))).
forbidden_reason(Context) -->
{ memberchk(needs_activation(User), Context) },
html([p(\local('The user ~p needs to activate their account'-[User])),
a(href(location_by_id(login(resend/User))), \local('Resend activation email'))]).
The text was updated successfully, but these errors were encountered: