diff --git a/Gemfile.lock b/Gemfile.lock index ccd9b22..1ef06c3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,13 +43,13 @@ GEM gravtastic (3.2.0) hirb (0.5.0) i18n (0.5.0) + kgio (2.4.1) mail (2.2.19) activesupport (>= 2.3.6) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.16) - nifty-generators (0.4.6) orm_adapter (0.0.5) polyglot (0.3.2) rack (1.2.3) @@ -79,6 +79,9 @@ GEM polyglot polyglot (>= 0.3.1) tzinfo (0.3.29) + unicorn (3.6.2) + kgio (~> 2.3) + rack warden (1.0.5) rack (>= 1.0) @@ -92,6 +95,6 @@ DEPENDENCIES forum_monster (~> 1.1) gravtastic hirb - nifty-generators rails (= 3.0.9) sqlite3 + unicorn diff --git a/app/models/ability.rb b/app/models/ability.rb index 6964aaa..f46c382 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -11,10 +11,10 @@ class Ability can :read, Topic, :forum => { :state => true, :category => { :state => true } } can :read, Post, :topic => { :forum => { :state => true, :category => { :state => true } } } - can :update, Post, :user_id => user.id - can :destroy, [Topic,Post], :user_id => user.id + can :update, Post, :user_id => user.id, :topic => { :locked => false } + can :destroy, [Topic,Post], :user_id => user.id, :topic => { :locked => false } - can :create, Post unless user.new_record? + can :create, Post, :topic => { :locked => false } unless user.new_record? can :create, Topic unless user.new_record? end end diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb index 53467cc..fdad186 100644 --- a/app/views/categories/index.html.erb +++ b/app/views/categories/index.html.erb @@ -30,7 +30,7 @@
<%= link_to "Back to Forum List", forums_path if can? :create, Forum %>
<%= link_to "Back to Forum List", forums_path %>
<%= "Administrator" if post.user.admin? %>
Posts <%= post.user.posts.size %>