public
Description: My money tracking app. There are many like it, but this one is mine.
Clone URL: git://github.com/dustin/money.git
Search Repo:
Moved common logic for admin controller extras into a common place.
dustin (author)
Mon May 26 18:54:56 -0700 2008
commit  263fe18f1a8d81be50431c7644cfe5d52e6a30b9
tree    42b0e95ed76a127e92755a2cb343454f94e05c27
parent  c2b201d3b18eb7354faec1f57b8309ab2994b058
...
1
2
 
 
3
4
5
...
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
...
1
2
3
4
5
6
7
...
95
96
97
 
 
 
 
 
 
 
 
 
 
 
 
98
0
@@ -1,5 +1,7 @@
0
 class AdmController < ApplicationController
0
 
0
+ include AdminControllerExtras
0
+
0
   TXN_LIMIT=TxnController::TXN_LIMIT
0
 
0
   def index
0
@@ -93,16 +95,4 @@ class AdmController < ApplicationController
0
     (1..8).map{|x| (97 + rand(26)).chr}.join
0
   end
0
 
0
- def authorized?
0
- logged_in? && current_user.admin?
0
- end
0
-
0
- def access_denied
0
- if logged_in?
0
- # XXX: Should probably find a good place for this document.
0
- render :template => 'report/access_denied'
0
- else
0
- redirect_to login_path
0
- end
0
- end
0
 end
...
1
2
 
 
3
4
5
...
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
...
1
2
3
4
5
6
7
...
175
176
177
 
 
 
 
 
 
 
 
 
 
 
178
0
@@ -1,5 +1,7 @@
0
 class ReportController < ApplicationController
0
 
0
+ include AdminControllerExtras
0
+
0
   def index
0
     title 'Reports'
0
     @today = Date.today
0
@@ -173,15 +175,4 @@ ENDSQL
0
     raise "#{n} is not a number" if n.class != Fixnum
0
   end
0
 
0
- def authorized?
0
- logged_in? && current_user.admin?
0
- end
0
-
0
- def access_denied
0
- if logged_in?
0
- render :action => :access_denied
0
- else
0
- redirect_to login_path
0
- end
0
- end
0
 end

Comments

    No one has commented yet.