App.add id %>
First, create this UNIX user:
-<blockquote><tt>portal_adduser <% #name appl %> "<% #rname appl %>"<% if #forward appl then %>" <% #email appl %>"<% end %></tt></blockquote>
+<blockquote><tt>portal_adduser <% #name appl %> "<% #rname appl %>"<% if #forward appl then %> "<% #email appl %>"<% end %></tt></blockquote>
-<p>You should then run <tt>visudo</tt> to add <% #name appl %> to the <tt>MEMBERS</tt> group. If you're not transmitting <% #name appl %>'s password to him by other means, run <tt>savepass <% #name appl %> <password></tt> to save it in <tt>~<% #name appl %>/.pass</tt>.</p>
+<p>You should then run <tt>visudo</tt> to add <% #name appl %> to the <tt>MEMBERS</tt> group. If you're not transmitting <% #name appl %>'s password to him by other means, run <tt>savepass <% #name appl %> <password></tt> to save it in <tt>~<% #name appl %>/.pass</tt>. If <% #name appl %> is bootstrapping with public-key ssh, don't forget to run <tt>savekey <% #name appl %> <authorized_keys file location></tt>.</p>
<form action="users" method="post">
<input type="hidden" name="app" value="<% #id appl %>">
val _ = header (outf, "Member list")
val _ = TextIO.output (outf, "<table>\n")
val (total, anon) = C.fold db printOne (0, 0)
- "SELECT name, rname, usr FROM WebUser LEFT OUTER JOIN DirectoryPref ON id = usr ORDER BY name"
+ "SELECT name, rname, usr FROM WebUserPaying LEFT OUTER JOIN DirectoryPref ON id = usr ORDER BY name"
in
TextIO.output (outf, "</table><br><br>\n\nUnlisted members: ");
TextIO.output (outf, Int.toString anon);
| doOne _ = raise Fail "Bad member row"
in
ignore (OS.Process.system ("/bin/rm " ^ outputDir ^ "member/*.html"));
- C.app db doOne "SELECT id, name, rname, joined, usr FROM WebUser LEFT OUTER JOIN DirectoryPref ON usr = id"
+ C.app db doOne "SELECT id, name, rname, joined, usr FROM WebUserPaying LEFT OUTER JOIN DirectoryPref ON usr = id"
end
fun genLocations () =
| doLink _ = raise Fail "Bad link' row"
val links = C.map db doLink (String.concat ["SELECT url, title, descr, name FROM Link",
- " JOIN WebUser ON WebUser.id = usr",
- " JOIN DirectoryPref ON WebUser.id = DirectoryPref.usr",
+ " JOIN WebUserPaying ON WebUserPaying.id = usr",
+ " JOIN DirectoryPref ON WebUserPaying.id = DirectoryPref.usr",
" ORDER BY title"])
fun appLink (url, title, descr, name) =
FOREIGN KEY (app) REFERENCES MemberApp(id) ON DELETE CASCADE,
FOREIGN KEY (usr) REFERENCES WebUser(id) ON DELETE CASCADE);
+CREATE VIEW WebUserPaying
+ AS SELECT id, name, rname, bal, joined, app
+ FROM WebUser
+ JOIN (SELECT usr FROM Membership JOIN WebGroup
+ ON grp = WebGroup.id
+ AND WebGroup.name = 'paying')
+ ON usr = WebUser.id;
+
CREATE VIEW WebUserActive
AS SELECT id, name, rname, bal, joined, app
FROM WebUser