Advertisement
ArievW

Wiki init.l

Jun 23rd, 2018
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. # 18jan18abu
  2. # (c) Software Lab. Alexander Burger
  3.  
  4. `(not (seq *DB))
  5.  
  6. # Create the first three documents in the root DB file
  7. (new T '(+Doc) 'nm "home")
  8. (new T '(+Doc) 'nm "menu")
  9. (new T '(+Doc) 'nm "help")
  10. (commit)
  11.  
  12. # Create two roles, one for admins and one for normal members
  13. (obj ((+Role) nm "Administrator") perm `*Perms)
  14. (obj ((+Role) nm "Member") perm (Wiki))
  15. (commit)
  16.  
  17. # Create the admin user
  18. (obj ((+User) nm "admin") pw `(passwd "admin") role `(db 'nm '+Role "Administrator"))
  19. (commit)
  20.  
  21. # Create some initial markup texts
  22. (put>
  23. (obj ((+Mup))
  24. u `(db 'nm '+User "admin")
  25. d `(date)
  26. t `(time)
  27. sum "Initial start page"
  28. txt "wiki/home.txt" )
  29. 'doc
  30. (db 'nm '+Doc "home") )
  31.  
  32. (put>
  33. (obj ((+Mup))
  34. u `(db 'nm '+User "admin")
  35. d `(date)
  36. t `(time)
  37. sum "Initial menu"
  38. txt "wiki/menu.txt" )
  39. 'doc
  40. (db 'nm '+Doc "menu") )
  41.  
  42. (put>
  43. (obj ((+Mup))
  44. u `(db 'nm '+User "admin")
  45. d `(date)
  46. t `(time)
  47. sum "Help text"
  48. txt "wiki/help.txt" )
  49. 'doc
  50. (db 'nm '+Doc "help") )
  51.  
  52. (commit)
  53.  
  54. # vi:et:ts=3:sw=3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement