X-Git-Url: https://git.hcoop.net/bpt/portal.git/blobdiff_plain/95a4653ec38aa96a24f3782b890f8c720518dc59..HEAD:/cert.mlt diff --git a/cert.mlt b/cert.mlt index 58933db..0206458 100644 --- a/cert.mlt +++ b/cert.mlt @@ -3,53 +3,58 @@ val admin = Group.inGroupName "server"; if $"new" <> "" then - if $"kind" = "cert" then - if $"req" <> "" then - %>

You filled data in next to a textbox but didn't check the radio button next to it.

<% - else - val cert = $"cert"; - val msg = $"msg"; - - %>Are you sure you want to ask for permissions on an SSL certificate at <% cert %>?

- Yes, I want to request that.<% - end - else - if $"cert" <> "" then - %>

You filled data in next to a textbox but didn't check the radio button next to it.

<% - else - val req = $"req"; - val msg = $"msg"; - - %>Are you sure you want to ask for permissions on an SSL certificate to be created from an OpenSSL request at <% req %>?

- Yes, I want to request that.<% - end - end - + val cert = $"cert"; + val domain = $"domain"; + val msg = $"msg"; + + if cert = "" then + %>

Please fill in a path to a certificate.

<% + elseif not (ChooseDomain.yourDomain {user = Init.getUserName (), domain = domain}) then + %>

You don't have permissions on domain <% Web.html domain %>.

<% + else + %>Are you sure you want to ask for permissions on an SSL certificate +
  • at <% Web.html cert %>,
  • +
  • for domain <% domain %>?
  • + Yes, I want to request that.<% + end elseif $"cmd" = "request" then - val id = Cert.add (Init.getUserId (), $"req", $"msg"); - if not (Cert.notifyNew id) then - %>

    Error sending e-mail notification

    <% - end - %>

    Request added

    <% - + val cert = $"cert"; + val domain = $"domain"; + val msg = $"msg"; + + if cert = "" then + %>

    Please fill in a path to a certificate.

    <% + elseif not (ChooseDomain.yourDomain {user = Init.getUserName (), domain = domain}) then + %>

    You don't have permissions on domain <% Web.html domain %>.

    <% + 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 + %>

    Error sending e-mail notification

    <% + end + %>

    Request added

    <% + end elseif $"cmd" = "open" then %>

    Open requests

    - List all requests<% + List all requests<% foreach (name, req) in Cert.listOpen () do %>


    - - + +
    By: <% name %>
    Time: <% #stamp req %>
    Request: <% #data req %>
    Time: <% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)
    Request: <% #data req %>
    Reason: <% Web.html (#msg req) %>
    <% if admin then %>
    - [Modify] - [Delete]
    - To install, run: tell adamc what text to put here. + [Modify] + [Delete]
    <% end %> <% end @@ -61,15 +66,15 @@ elseif $"cmd" = "list" then


    - - + +
    By: <% name %>
    Time: <% #stamp req %>
    Request: <% #data req %>
    Time: <% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)
    Request: <% #data req %>
    Reason: <% Web.html (#msg req) %>
    <% if admin then %>
    - [Modify] - [Delete] + [Modify] + [Delete] <% end %> <% end @@ -85,7 +90,7 @@ elseif $"mod" <> "" then - +
    Requestor: <% #name user %>
    Time: <% #stamp req %>
    Time: <% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)
    Status: - - + +
    OpenSSL request:
    OpenSSL certificate:
    Domain: <% @chooseDomain[] %>
    OpenSSL certificate:
    Additional comments: