X-Git-Url: https://git.hcoop.net/hcoop/portal.git/blobdiff_plain/1bb18394126be0c2f9bfb2dc0e147d9180b805f5..f2bab7c8c21cd0dde8c63b8450ce628ff654cb80:/sec.mlt
diff --git a/sec.mlt b/sec.mlt
index a41b412..020c0f9 100644
--- a/sec.mlt
+++ b/sec.mlt
@@ -2,7 +2,7 @@
val yourname = Init.getUserName ();
val nodeNum = case $"node" of
- "" => 2
+ "" => 4
| node => Web.stoi node;
val nodeName = Init.nodeName nodeNum;
@@ -13,7 +13,6 @@ val uname = case $"uname" of
val socks = Sec.socketPerms {node = nodeNum, uname = uname};
val tpe = Sec.isTpe {node = nodeNum, uname = uname};
val cron = Sec.cronAllowed {node = nodeNum, uname = uname};
-val ftp = Sec.ftpAllowed {node = nodeNum, uname = uname};
ref showNormal = true;
@@ -55,20 +54,6 @@ elseif $"cmd" = "cron2" then
%>
Error sending e-mail notification
<%
end
%>
Request added
<%
-
-elseif $"cmd" = "ftp" then
- showNormal := false;
- val ftp = iff $"ftp" = "yes" then "enabled" else "disabled";
- %>Are you sure you want to request that FTP permissions for <% Web.html uname %> on <% Web.html nodeName %> be <% ftp %>?
- ">Yes, place the request!<%
-elseif $"cmd" = "ftp2" then
- val ftp = iff $"ftp" = "enabled" then "enable" else "disable";
- val id = Sec.Req.add {usr = you, node = nodeNum, data = String.concat [uname, ": ", ftp, " FTP access"], msg = $"msg"};
- if not (Sec.Req.notifyNew id) then
- %>
Error sending e-mail notification
<%
- end
- %>
Request added
<%
-
elseif $"cmd" = "rule" then
showNormal := false;
val rule = $"rule";
@@ -84,7 +69,7 @@ elseif $"cmd" = "rule2" then
val rule = $"rule";
if Sec.validRule rule then
- val id = Sec.Req.add {usr = you, node = nodeNum, data = String.concat ["Add firewall rule \"", uname, " ", rule, "\""], msg = $"msg"};
+ val id = Sec.Req.add {usr = you, node = nodeNum, data = String.concat ["Add firewall rule \"", nodeName, " ", uname, " ", rule, "\""], msg = $"msg"};
if not (Sec.Req.notifyNew id) then
%>
Error sending e-mail notification
<%
end
@@ -185,9 +170,9 @@ elseif $"mod" <> "" then
Node:
-
Request:
+
Request:
Message:
@@ -201,10 +186,8 @@ elseif $"mod" <> "" then
val oldStatus = #status req;
val newStatus = Sec.Req.statusFromInt (Web.stoi ($"status"));
Sec.Req.modify {req with node = nodeNum, data = $"req", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Sec.Req.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
- %>
Error sending e-mail notification
<%
- end
+ if not (Sec.Req.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
+ %>
Error sending e-mail notification
<%
end
%>
Request modified
Back to: open requests, all requests
@@ -228,137 +211,9 @@ elseif $"mod" <> "" then
<% end;
-if showNormal then %>
-
-
-
-
-
-
-
-
-
Request change to your cron permissions
-
-
-
-
Request change to your FTP permissions
-
-
Please read our wiki instructions on file transfer before requesting FTP access. Almost everyone should use alternative protocols to FTP that provide superior security benefits.
-
-<% foreach rule in rules do %>
-
-<% end
-end%>
-
-
Request a new firewall rule
-
-
This form isn't needed yet to allow you to use on any port. However, if you request a rule here, you can be sure it will be added when we first implement firewalls on our new servers. Otherwise, your custom services may stop working.
-
-
You can find a description of rule formats on our wiki. Enter here the rule you want, without the initial user portion.
-
-
Please note that your firewall rule will be useless if you don't first request the corresponding socket privileges at the top of this page. Also, common ports like 80 (HTTP) are open to everyone with socket permissions. Verify that you can't access a port after socket permissions have been granted before requesting a special rule here.
-
-
We very rarely grant requests for Client rules that don't include remote host whitelists. For example, important security concerns make it a bad idea for us to give anybody blanket IRC permissions. Instead, request specific servers. We will refuse such requests that include networks that are popularly considered fronts for illegal activity.
-
-
-
-<% end %>
+if showNormal then
+ @secnormal [("uname", [uname]),
+ ("nodeNum", [Int.toString nodeNum])];
+end %>
<% @footer[] %>
\ No newline at end of file