Commit graph

65 commits

Author SHA1 Message Date
Joey Hess
8df5be7804 fix build with xmpp enabled but not local pairing 2013-04-21 13:24:56 -04:00
Joey Hess
eeaf471f2f minor tweak to fix a build issue when TH is splices 2013-04-16 22:46:20 -04:00
Joey Hess
c1b682cb8f another no-xmpp fix 2013-04-16 19:30:09 -04:00
Joey Hess
0400c5f596 fix redirect from XMPP prompt to pairing pages 2013-03-16 19:19:58 -04:00
Joey Hess
140774a8c8 webapp: Switch all forms to POST. 2013-03-16 18:48:26 -04:00
Joey Hess
c94c99942b make liftAnnex and liftAssistant polymorphic, like liftIO 2013-03-16 00:19:56 -04:00
Joey Hess
77c82de4ea webapp: Display an alert when there are XMPP remotes, and a cloud transfer repository needs to be configured. 2013-03-15 17:52:41 -04:00
Joey Hess
39e979fb65 webapp: Improved UI for pairing your own devices together using XMPP. 2013-03-15 15:19:07 -04:00
Joey Hess
810a06b771 webapp: Repository list is now included in the dashboard, and other UI tweaks. 2013-03-15 00:34:42 -04:00
Joey Hess
6c7ce8f193 reorg repolist 2013-03-14 22:10:51 -04:00
Joey Hess
0ef8d806ac gratuitous rename HomeR -> DashboardR 2013-03-12 22:18:36 -04:00
Joey Hess
8221c2b4ed split repolist out of configuration, into its own tab (temporarily) 2013-03-12 21:51:03 -04:00
Joey Hess
c03fdf5a15 fix password length check to match message 2013-03-05 16:21:13 -04:00
Joey Hess
907b0c0d78 better liftAnnex, avoid using runAnnex undefined 2013-03-04 16:36:38 -04:00
Joey Hess
5274713305 webapp: Proceed automatically on from "Configure jabber account" to pairing. 2013-03-04 16:03:24 -04:00
Joey Hess
7f7c31df1c type based git config handling
Now there's a Config type, that's extracted from the git config at startup.
Note that laziness means that individual config values are only looked up
and parsed on demand, and so we get implicit memoization for all of them.
So this is not only prettier and more type safe, it optimises several
places that didn't have explicit memoization before. As well as getting rid
of the ugly explicit memoization code.

Not yet done for annex.<remote>.* configuration settings.
2012-12-29 23:10:18 -04:00
Joey Hess
0d50a6105b whitespace fixes 2012-12-13 00:45:27 -04:00
Joey Hess
7b032dbbc8 webapp: Fix bad interaction between required fields and modals. 2012-12-02 17:32:54 -04:00
Joey Hess
3dfc9cadb0 simplify 2012-11-25 00:38:11 -04:00
Joey Hess
59733456ed refactor 2012-11-25 00:27:17 -04:00
Joey Hess
d468e37f46 automatic repolist updating 2012-11-13 17:50:54 -04:00
Joey Hess
8fd78f45a2 fix build without XMPP
not sure if I'll keep bothering with this option
2012-11-12 01:48:15 -04:00
Joey Hess
8b22bd8831 add a yes/no confirm for xmpp pairing requests 2012-11-11 22:29:16 -04:00
Joey Hess
b91f07fe83 split up xmpp and local pairing UIs 2012-11-11 17:41:56 -04:00
Joey Hess
b160856297 end of xmpp pairing page encourages adding a shared cloud repository 2012-11-10 20:38:52 -04:00
Joey Hess
da6fb44446 finished XMPP pairing!
This includes keeping track of which buddies we're pairing with, to know
which PairAck are legitimate.
2012-11-05 17:43:17 -04:00
Joey Hess
db36b11e28 switch to silent chat messages for XMPP pairing
Along the way, significantly cleaned up Assistant.XMPP, and made XMPP
message decoding more efficient.
2012-11-05 15:40:56 -04:00
Joey Hess
0b8027e527 webapp: When setting up authorized_keys, use GIT_ANNEX_SHELL_DIRECTORY. 2012-11-05 12:35:05 -04:00
Joey Hess
a6cecfcf33 workaround for Google Talk's insane handling of self-directed presence
Maybe the spec allows it, but broadcasting self-directed presence info to
all buddies is just insane.

I had to bring back the IQ messages for self-pairing, while still using
directed presence for other pairing. Ugly.
2012-11-03 22:52:41 -04:00
Joey Hess
17e84a8096 switch to directed presence for pair requests
Testing between Google Talk and prosody, the directed IQ messages
were not received. Google Talk probably only relays them between
clients using the same account.

I first tried even more directed presence, with each client JID being sent
a separate presence, but that didn't work on Google Talk, particularly
it was ignored when one client sent it to another client using the same
account.

So, presence directed at the user@host of the client to pair with. Tested
working between Google Talk and prosody (in both directions), as well
as between two clients with the same account on Google Talk, and
two clients with the same account on prosody.

Only problem with this form of directed presence is that if I also use it
for git pushes, more clients than are interested in a push's data will
receive it. So I may need some better approach, or a hybrid between
directed IQ and directed presence.
2012-11-03 21:19:59 -04:00
Joey Hess
42f030c905 XMPP pair requests are now received, and an alert displayed 2012-11-03 17:46:22 -04:00
Joey Hess
b95c255b6d XMPP pairing notifications are now sent
Rest of pairing process still to do.
2012-11-03 16:01:09 -04:00
Joey Hess
9a8d0be866 send a presence query when the buddy list is displayed
This ensures that clients that have not sent presence in a while will show
up in the list.
2012-11-03 14:25:06 -04:00
Joey Hess
6a61829e2d add buddy list to pairing UI 2012-11-02 21:13:06 -04:00
Joey Hess
88d1907278 where indentation 2012-10-31 02:34:03 -04:00
Joey Hess
93ffd47d76 finished pushing Assistant monad into all relevant files
All temporary and old functions are removed.
2012-10-30 17:14:51 -04:00
Joey Hess
68118b8986 split remaining assistant types 2012-10-30 14:34:48 -04:00
Joey Hess
1852eddce6 lift alertWhile 2012-10-29 16:49:47 -04:00
Joey Hess
e18b733c81 move alert display functions 2012-10-29 16:34:11 -04:00
Joey Hess
4dbdc2b666 Assistant monad, stage 2.5
Converted several threads to run in the monad.

Added a lot of useful combinators for working with the monad.

Now the monad includes the name of the thread.

Some debugging messages are disabled pending converting other threads.
2012-10-29 02:21:04 -04:00
Joey Hess
4e765327ca Assistant monad, stage 1
This adds the Assistant monad, and an AssistantData structure.
So far, none of the assistant's threads run in the monad yet.
2012-10-29 00:15:43 -04:00
Joey Hess
5544ca2fb8 build fix with pairing disabled 2012-10-26 12:56:19 -04:00
Joey Hess
7ee0ffaeb9 Use USER and HOME environment when set, and only fall back to getpwent, which doesn't work with LDAP or NIS. 2012-10-25 18:17:54 -04:00
Joey Hess
cb3c9340f8 license the webapp under the AGPL 3+
This means that anyone serving up the webapp to users as a service
(ie, without providing any git-annex binary at all to the user) still needs
to provide a link to the source code for it, including any modifications
they may make.

This may make git-annex be covered by the AGPL as a whole when it is built
with the webapp. If in doubt, you should ask a lawyer.

When git-annex is built with the webapp disabled, no AGPLed code is used.
Even building in the assistant does not pull in AGPLed code.
2012-09-24 14:48:47 -04:00
Joey Hess
ade511f6e3 keep webapp snappy by generating ssh keypair in the background 2012-09-11 15:51:27 -04:00
Joey Hess
99d52f26bc fix combining of pairing alerts 2012-09-11 15:43:33 -04:00
Joey Hess
2c1ceeeaf9 pairing works!!
Finally.

Last bug fixes here: Send PairResp with same UUID in the PairReq.
Fix off-by-one in code that filters out our own pairing messages.

Also reworked the pairing alerts, which are still slightly buggy.
2012-09-11 15:09:00 -04:00
Joey Hess
aace44454a keep track of the stage we're at in pairing
This avoids us responding to our own pairing messages, as well
as ignoring any out of order messages that might be received somehow.
2012-09-11 12:58:00 -04:00
Joey Hess
16d27e9c02 work around a bug in Yesod
The PathPiece instance for Text results in a 404 for T.empty.
2012-09-11 12:26:42 -04:00
Joey Hess
0208d6aa82 add a UUID to pair requests
Pair requests the the same UUID are part of the same pairing session,
which allows us to detect attempts to brute force the shared secret,
as that will result in pair requests with the same UUID that are
not verified with the right secret.
2012-09-11 03:16:00 -04:00