muck-users 0.2.13 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.13
1
+ 0.2.14
@@ -31,6 +31,14 @@ module ActionController
31
31
  @current_user = current_user_session && current_user_session.record
32
32
  end
33
33
 
34
+ def admin_required
35
+ unless logged_in? && admin?
36
+ store_location
37
+ flash[:notice] = I18n.t('muck.users.admin_requred')
38
+ redirect_to login_path
39
+ end
40
+ end
41
+
34
42
  def login_required
35
43
  unless logged_in?
36
44
  store_location
data/locales/en.yml CHANGED
@@ -99,6 +99,7 @@ en:
99
99
  login_out_success: "You have been logged out."
100
100
  login_fail: "We're sorry, but we couldn't recognize your login information. Please try again."
101
101
  login_requred: "You must be logged in to access this feature."
102
+ admin_requred: "You must be an administrator to access this feature."
102
103
  logout_required: ""
103
104
  permission_denied: "You don't have permission to complete the requested action."
104
105
  access_denied: "You don't have permission to access the requested page."
data/muck-users.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-users}
8
- s.version = "0.2.13"
8
+ s.version = "0.2.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball"]
12
- s.date = %q{2009-10-16}
12
+ s.date = %q{2009-10-17}
13
13
  s.description = %q{Easily add user signup, login and other features to your application}
14
14
  s.email = %q{justinball@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-users
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-16 00:00:00 -06:00
12
+ date: 2009-10-17 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency