<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -55,6 +55,7 @@ class AccountController &lt; ApplicationController
 
   protected
     def default_url(user)
-      admin? ? url_for(:controller =&gt; '/admin/overview', :action =&gt; 'index') : dispatch_url(:path =&gt; [])
+      # If the user can log in then they have permission to act in the admin section (non-admins can post, admins can admin the site)
+      logged_in? ? url_for(:controller =&gt; '/admin/overview', :action =&gt; 'index') : dispatch_url(:path =&gt; [])
     end
 end</diff>
      <filename>app/controllers/account_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,8 +38,8 @@ class AccountControllerLoginTest &lt; ActiveSupport::TestCase
   test &quot;should login as site user&quot; do
     post :login, :login =&gt; 'ben', :password =&gt; 'test'
     assert session[:user]
-    # ben is not an admin so should be redirected to the front page
-    assert_redirected_to :controller =&gt; 'mephisto', :action =&gt; 'dispatch'
+    # ben is not a site admin but as a user ben has the ability to post so direct ben to the admin overview
+    assert_redirected_to :controller =&gt; 'admin/overview', :action =&gt; 'index'
     post :logout
     assert !session[:user]
   end</diff>
      <filename>test/functional/account_controller_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3700f8d9e7aeefaf5d175d2ea4e412c2927ec229</id>
    </parent>
  </parents>
  <author>
    <name>Chris Cummer</name>
    <email>chris@postal-code.com</email>
  </author>
  <url>http://github.com/emk/mephisto/commit/e6ef40f48b4d37f18381e8a0ed2dd5a551a7d82b</url>
  <id>e6ef40f48b4d37f18381e8a0ed2dd5a551a7d82b</id>
  <committed-date>2009-01-09T04:28:52-08:00</committed-date>
  <authored-date>2009-01-04T12:36:51-08:00</authored-date>
  <message>Changed user login to send user to admin section on succesful login instead of the blog homepage since users have the ability to post to the blog</message>
  <tree>f48310c10b955f3eacf2eea4017212f38fd66984</tree>
  <committer>
    <name>Eric Kidd</name>
    <email>git@randomhacks.net</email>
  </committer>
</commit>
