diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-05-21 08:07:19 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-05-21 10:49:07 +0200 |
commit | 53b3c32a0fa2d119c859e56c6b02680658c4a804 (patch) | |
tree | f9e576dced753f6120b8028bc1ec1d94fa8c52c7 /app/models/question_category.rb | |
parent | Generated Question and QuestionCategory models. (diff) | |
download | recruiting-webapp-53b3c32a0fa2d119c859e56c6b02680658c4a804.tar.gz recruiting-webapp-53b3c32a0fa2d119c859e56c6b02680658c4a804.tar.bz2 recruiting-webapp-53b3c32a0fa2d119c859e56c6b02680658c4a804.zip |
Permissions Question and QuestionCategory models
Created Permissions::AnyoneCanViewRecruiterCanChange module and used it
to add permissions for Question and QuestionCategory models.Added
Permissions::TestPermissions module and used it to tests
permissions for Question and QuestionCategoryfor Created users fixture
tests for User and Question now use fixture.
Diffstat (limited to 'app/models/question_category.rb')
-rw-r--r-- | app/models/question_category.rb | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/app/models/question_category.rb b/app/models/question_category.rb index af4b0fd..16fbc2a 100644 --- a/app/models/question_category.rb +++ b/app/models/question_category.rb @@ -8,22 +8,6 @@ class QuestionCategory < ActiveRecord::Base end has_many :questions - # --- Permissions --- # - - def create_permitted? - acting_user.administrator? - end - - def update_permitted? - acting_user.administrator? - end - - def destroy_permitted? - acting_user.administrator? - end - - def view_permitted?(field) - true - end + include Permissions::AnyoneCanViewRecruiterCanChange end |