- val id = Cert.add (Init.getUserId (), $"req", $"msg");
- if not (Cert.notifyNew id) then
- %><h3>Error sending e-mail notification</h3><%
- end
- %><h3>Request added</h3><%
-
+ val cert = $"cert";
+ val domain = $"domain";
+ val msg = $"msg";
+
+ if cert = "" then
+ %><h3>Please fill in a path to a certificate.</h3><%
+ elseif not (ChooseDomain.yourDomain {user = Init.getUserName (), domain = domain}) then
+ %><h3>You don't have permissions on domain <tt><% Web.html domain %></tt>.</h3><%
+ else
+ val text = "/afs/hcoop.net/common/etc/scripts/ca-install "
+ ^ Init.getUserName () ^ " "
+ ^ domain ^ " "
+ ^ cert
+
+ val id = Cert.add (Init.getUserId (), text, msg);
+ if not (Cert.notifyNew id) then
+ %><h3>Error sending e-mail notification</h3><%
+ end
+ %><h3>Request added</h3><%
+ end