Permalink
Browse files

Added login permission.

  • Loading branch information...
1 parent 46896ad commit 77810ab9c85bcef5255fe78455e8e1fff53cff92 @Licenser Licenser committed Jun 7, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 apps/wiggle/priv/js/snarl.js
  2. +2 −2 apps/wiggle/src/wiggle_handler.erl
@@ -14,6 +14,7 @@ var debug;
"info": true
};
var wiggle = {
+ "login": true,
"module": {
"about": true,
"account": true,
@@ -48,15 +48,15 @@ handle(Req, State) ->
Auth ->
case libsnarl:user_cache(Auth, Auth) of
{ok, Auth1} ->
- case libsnarl:allowed(Auth, Auth1, [service, wiggle]) of
+ case libsnarl:allowed(Auth, Auth1, [service, wiggle, login]) of
true ->
request(Method, Path, Auth1, Req3, State);
false ->
{ok, Req4} = wiggle_session:del(Req3),
login(Req4, State)
end;
_ ->
- case libsnarl:allowed(Auth, Auth, [service, wiggle]) of
+ case libsnarl:allowed(Auth, Auth, [service, wiggle, login]) of
{ok, _} ->
request(Method, Path, Auth, Req3, State);
_ ->

0 comments on commit 77810ab

Please sign in to comment.