Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
(other minor change: log the user ID when invalid post editing
requests were constructed)
|
|
|
|
Converse now sets the user ID as the session identity parameter in
actix_web's identity middleware after a successful login and uses the
ID to determine identity when creating threads & posts and when
validating edit permissions.
|
|
Relicense the project from the standard GPL3 to the Affero version of
the license, requiring source code disclosure for modifications made
on instances of Converse that are serving users over the network.
|
|
Implements a handler that receives the edit form result and updates
the database accordingly if the user identity matches.
|
|
Displays an edit form for posts that are owned by a user (which is
currently defined as "email addresses match").
|
|
Adds a generic template that can be used for submitting, responding to
and editing posts.
|
|
|
|
|
|
There are several reasons for this, but one important one is that
people expect to be able to share search links.
|
|
Implements a very simple and currently kinda broken-looking search
result view.
|
|
|
|
|
|
This is a simplification over the previous approach. The OP of a
thread is just a normal post like any other in this model, which
allows some code simplifications (and future query convenience).
|
|
Adds a `REQUIRE_LOGIN` environment variable which, if set to anything
other than true, will let users post anonymously on the forums.
|
|
|
|
This took me some time to figure out so it's useful to document in the
commit message.
When chaining messages from actors, the result type of a message (i.e.
the actual `<M as Message>::Result`) is sometimes itself a
`Result<T, E>`.
In many cases this leads to a situation where the return type of a
message sending process is something like (simplified):
Future<Item=Result<Foo, ConverseError>, Error=actix::MailboxError>
Due to the implementation of
`From<actix::MailboxError> for ConverseError` it is possible to use
`.from_err()` on these futures to convert the future's `Error` to
`ConverseError`.
The type `Result` apparently implements `IntoFuture`, which means that
due to some trait magic that's been applied somewhere in the futures
API a call to `flatten()` can "lift" the contained error if the error
types match and give us a "simple"
Future<Item=Foo, Error=ConverseError>
From that point on chaining becomes easy.
|
|
|
|
- ensure users are correctly linked to a post actor after replying
- ensure timestamps are clickable to get post IDs
|
|
|
|
This currently breaks error handling in page render flows. To fix it
properly, the database actor should return failable futures instead of
`Result<T>` wrapped in a future.
|
|
|
|
|
|
Adds a middleware that automatically redirects users to the login page
if they don't have an active session (i.e. 'author' set).
|
|
|
|
|
|
|
|
|
|
|