Commit Graph

75 Commits

Author SHA1 Message Date
Piotr Sarnacki
1238caf318 Fix signing out on failed try to update user data
A while ago I introduced a change to auth code which signs out user on
failed try to get user data. The problem with it was it signed out on
all kind of errors, like network error. I changed the code to log out on
401 status, but I haven't tested it properly, we actually return 403 on
unauthenticated queries for user data.
2014-06-23 15:15:40 +02:00
Piotr Sarnacki
a64c800423 Bring back refreshUserData when setting user data
User data needs to be refreshed on sign in, otherwise we don't have
fresh data regarding isSyncing property and other fields which can
change between refreshing page.
2014-06-19 14:32:48 +02:00
Piotr Sarnacki
1f3f06f60e Make Auth class global
It will allow to extend it in travis-pro-web
2014-06-10 09:13:20 +02:00
Piotr Sarnacki
3b1cd4f5c4 Bring back afterSignIn and afterSignIn as actions sent to controller
It seems that there is more use cases to cover with this behaviour, for
example when someone enters /auth directly and logs in from there.
2014-05-28 10:22:48 +02:00
Piotr Sarnacki
3544d523d7 Refactor auth code
* don't use __container__
* register it as a factory on container and inject into routes and
  controller
* avoid afterSignIn errors by checking on hooksTarget, ApplicationRoute
  should register itself as a hooksTarget
* keep user info on auth
2014-05-28 10:22:47 +02:00
Piotr Sarnacki
b280a42804 Sign out only if request for user data returns 401 2014-05-14 14:38:25 +02:00
Piotr Sarnacki
1d06666357 signOut on refresh user data error 2014-04-09 00:14:28 +02:00
Piotr Sarnacki
8c513fd7d2 Use action bubbling instead of checking for contructor in AuthRoute 2014-02-19 16:17:31 +01:00
Henrik Hodne
2450f9fe9d Revert previous revert
I found the commit that caused the bug that caused me to do the last
revert. I'm therefore reverting the previous revert and I will be
committing a revert that reverts the commit that introduced the bug. See
next commit.

This reverts commit db2d38a7af.
2014-02-12 09:54:24 -06:00
Henrik Hodne
db2d38a7af
Revert setting panel deploy
This seems to have caused issues with enabling the hooks for
repositories.
2014-02-12 09:14:47 -06:00
Piotr Sarnacki
8d19410264 Merge remote-tracking branch 'origin/settings-pane'
Conflicts:
	assets/scripts/app/controllers.coffee
	assets/scripts/app/routes.coffee
	assets/scripts/app/views/repo/show.coffee
2014-02-12 11:52:01 +01:00
Justine Arreche
35e7fc4f55 removed instances of locales from app and auth coffeescript files 2014-01-13 15:03:18 -05:00
Piotr Sarnacki
c18222ea51 Settings pane
This commit contains a settings pane implementation. There are a couple
of things here, which are not used yet, like advanced form helpers. I'm
leaving them here, because the plan is to add support for more settings
soon (like: include/exclude branch patterns), which will need these
helpers.

There is also tabs support, although in the current version there is
only one tab (initially it was created for supporting general tab and
notifications tab).
2013-12-18 11:02:23 +01:00
Piotr Sarnacki
9170795639 Improve auth code in router by using new async stuff (❤️ @machty) 2013-08-03 20:48:59 +02:00
Piotr Sarnacki
8082d3a6d3 Update loading user to EmberModel's version 2013-07-31 13:45:52 +02:00
Piotr Sarnacki
8daf5b857a Don't fail if user signs out before router is set up 2013-07-31 13:45:23 +02:00
Piotr Sarnacki
ded00e0182 unloadRecord -> unload 2013-07-31 13:44:56 +02:00
Piotr Sarnacki
0d12176239 Don't error out if router is not yet setup
When router is not set up yet sending events to it will fail. If that's
the case, we can just swallow the error, because afterSignIn will take
effect only if we are already in some state in the router.
2013-06-05 12:43:27 +02:00
Piotr Sarnacki
22c1710e14 Update user data after sign in 2013-05-21 19:30:19 +02:00
Piotr Sarnacki
d8b96a960d Always send afterSignIn event 2013-05-16 13:16:53 +02:00
Piotr Sarnacki
3f30f3eec9 sign out before resetting app 2013-05-15 17:23:51 +02:00
Piotr Sarnacki
99c3ad770c Router changes for new ember.js 2013-05-15 17:23:50 +02:00
Piotr Sarnacki
df9db80c42 A few improvements for tabs on repos list
* if user is logged out, the default tab should be 'recent'
* when user logs in, the tab is switched to 'my repositories'
* when user logs out, my repositories is hidden again and tab is
  switched to 'recent'
2013-04-30 02:45:16 +02:00
Piotr Sarnacki
e23d16c135 Sign out user before running tests 2013-04-29 23:00:13 +02:00
Piotr Sarnacki
ce6862e6a0 Always poll for changes when user is syncing 2013-03-29 22:15:19 +01:00
Sven Fuchs
2e8b74160c move log subscrition to a log controller 2013-03-06 19:59:59 +01:00
Piotr Sarnacki
211b2723f9 Fix authentication 2013-02-26 07:05:40 +01:00
Piotr Sarnacki
a3622e14c9 Allow to sign in and sign out 2013-02-21 23:22:53 +01:00
Piotr Sarnacki
4b01db6d4b Don't parse user if data can't be fetched from storage (closes #124) 2013-01-30 02:24:12 +01:00
Konstantin Haase
5b48aa20e7 check scopes 2013-01-07 20:59:54 +01:00
Konstantin Haase
cb392b549d reduce logging 2012-12-17 20:33:28 +01:00
Konstantin Haase
f756df1468 typo 2012-12-17 20:17:36 +01:00
Konstantin Haase
12c84d8359 more logging in auth 2012-12-17 20:15:19 +01:00
Konstantin Haase
7ce690aecf add logging 2012-12-17 19:58:34 +01:00
Konstantin Haase
f326960f9a check for token 2012-12-17 15:19:22 +01:00
Konstantin Haase
34aaa070c9 don't check for token for now 2012-12-16 18:14:04 +01:00
Konstantin Haase
946dd55ce3 fix validation 2012-12-16 18:01:44 +01:00
Konstantin Haase
6c87a9c267 more verbose validation 2012-12-16 17:52:59 +01:00
Konstantin Haase
0b7d7a6eec fix typo 2012-12-16 17:44:27 +01:00
Konstantin Haase
de0790c5d9 we might not have user yet 2012-12-16 17:26:52 +01:00
Konstantin Haase
a37dc4dca3 fix for nested user data 2012-12-16 17:20:32 +01:00
Konstantin Haase
43726e4025 fix reference 2012-12-16 17:04:41 +01:00
Konstantin Haase
5d7604567c js and bindings, how does it work? 2012-12-16 17:00:31 +01:00
Konstantin Haase
368ef859ea refactor auth 2012-12-16 16:57:12 +01:00
Sven Fuchs
ab0cb7d432 set auto_signin flag to false before actually trying to sign in 2012-12-16 14:59:43 +01:00
Sven Fuchs
b6df2bfbe1 add Auth.validateUser 2012-12-16 14:25:52 +01:00
Randy Morgan
e4fb6c1fee Completed dynamic I18n intetegration.
travis-web starts in English. When the user logs in, it switches to
their locale, when they logout, it goes back to english.
2012-12-11 10:48:19 +09:00
Piotr Sarnacki
8e97b68313 Make the app work with disabled cookies
Browsers disable local storage and session storage when cookies are
disabled - any call to one of those will cause an error. This commit
provides fallback storage, which will store items in memory.
2012-12-10 17:37:09 +01:00
Piotr Sarnacki
a662d03ee7 Revert "Don't automatically sign in if there is no token available"
This commit breaks login in Safari, without it people will need log out
and log in again if they experienced 401 requests on the profile page,
but we can't break Safari.

It seems that the root cause of the error is the fact that auto sign in
fails in Safari.

This reverts commit d84b3581eb.
2012-12-10 13:53:35 +01:00
Piotr Sarnacki
d84b3581eb Don't automatically sign in if there is no token available 2012-12-10 11:22:18 +01:00