Added very basic and not-very-secure authentication. Smeagol is now usable.

This commit is contained in:
Simon Brooke 2014-11-11 12:24:44 +00:00
parent d437f07fc2
commit fc89b25a2f
12 changed files with 140 additions and 32 deletions

View file

@ -10,11 +10,19 @@ Smeagol uses the Markdown format as provided by [markdown-clj](https://github.co
## Security and authentication
Not done yet.
Currently security is very weak. There is currently a file called *passwd* in the *resources/public* directory, which contains a clojure map of username/plain-text password pairs thus:
{:admin "admin"}
that is to say, the username is a keyword and the corresponding password is a string. Obviously, this is a temporary solution while in development which I will fix later.
## Todo
Git integration!
* Git integration! Smeagol doesn't have any inbuilt versioning or backup mechanism; it's intended that Git will be used as that mechanism. But it isn't implemented yet.
* Image (and other media) upload.
* Improved security.
* Mechanism to add users through the user interface.
* Mechanism to change passwords through the user interface.
## Editing the framing content

View file

@ -18,6 +18,13 @@ body {
background:rgba(40,40,40,0.8);
}
#user {
font-height: 66%;
float: right;
padding: 0.1em 0.75em;
margin: 0;
}
/* only needed for fly-out menu effect on tablet and phone stylesheets */
#nav-icon {
display: none;
@ -120,10 +127,15 @@ input {
background-color: white;
}
input.submit {
input.action {
background-color: green;
}
input.action-dangerous {
color: white;
background-color: red;
}
input.required:after {
content: " \*";
color: red;

1
resources/public/passwd Normal file
View file

@ -0,0 +1 @@
{:admin "admin"}