diff options
Diffstat (limited to 'app/controllers/forumgroups_controller.rb')
-rw-r--r-- | app/controllers/forumgroups_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/forumgroups_controller.rb b/app/controllers/forumgroups_controller.rb index fe359af..3e53b4a 100644 --- a/app/controllers/forumgroups_controller.rb +++ b/app/controllers/forumgroups_controller.rb @@ -9,7 +9,7 @@ class ForumgroupsController < ApplicationController end def edit - if admin? + if admin? && current_user.confirmed? @group = Forumgroup.find(params[:id]) else flash[:alert] = "You are not allowed to edit forum groups." @@ -17,7 +17,7 @@ class ForumgroupsController < ApplicationController end def update - if admin? + if admin? && current_user.confirmed? @group = Forumgroup.find(params[:id]) if @group.update_attributes(group_params) flash[:notice] = "Forum group updated" @@ -32,7 +32,7 @@ class ForumgroupsController < ApplicationController end def new - if admin? + if admin? && current_user.confirmed? @group = Forumgroup.new else flash[:alert] = "You are not allowed to create forum groups." @@ -41,7 +41,7 @@ class ForumgroupsController < ApplicationController end def create - if admin? + if admin? && current_user.confirmed? @group = Forumgroup.new(group_params) if @group.save flash[:notice] = "Forum group created." @@ -57,7 +57,7 @@ class ForumgroupsController < ApplicationController end def destroy - if admin? + if admin? && current_user.confirmed? @group = Forumgroup.find(params[:id]) if @group.destroy flash[:notice] = "forum group deleted." |