Permalink
Browse files

admin field

  • Loading branch information...
1 parent bdfa2c5 commit 8951f382250830e3bab0ff2bc66234d20ee62b5d @substack committed Oct 1, 2010
Showing with 14 additions and 0 deletions.
  1. +1 −0 data/users.json
  2. +1 −0 lib/models/user.js
  3. +12 −0 views/login_bar.html
  4. 0 views/{ → pages}/index.html
View
@@ -22,6 +22,7 @@
"substack" : {
"hash" : "dce1198b941cdda02f092c9702ee8d0a3efeb89aec50f95bfd31b778a2109cfcb0979fbbec6df4d27ff0da9bc9efb4806ab563bfd4e960ba5a5f2b2fe683e273",
"contacts" : ["moo", "pkrumins", "ik"],
+ "admin" : true,
"disks" : {
"linux-0.2.img" : {
"name" : "simple linux",
View
@@ -22,6 +22,7 @@ function User (params) {
self.name = params.name;
self.hash = params.hash;
+ self.admin = params.admin;
self.directories = {
disks : __dirname + '/../../users/' + self.name + '/disks/',
View
@@ -0,0 +1,12 @@
+<% if (user) { %>
+ <form action='/logout' method='post'>
+ signed in as <%= user.name %>
+ <input type='submit' value='logout'>
+ </form>
+<% } else { %>
+ <form action='/' method='post'>
+ <input type='text' name='user'>
+ <input type='password' name='pass'>
+ <input type='submit' value='sign in'>
+ </form>
+<% } %>
File renamed without changes.

0 comments on commit 8951f38

Please sign in to comment.