aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-07-15 14:44:01 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-07-21 20:49:50 +0200
commit46ff88d32324d5100444cb59e07229589a825f49 (patch)
treea7fe95b26a90b2cab8bf69a3510dd158800c800a /app/models
parentAllow viewing listings of answers of other users (diff)
downloadrecruiting-webapp-46ff88d32324d5100444cb59e07229589a825f49.tar.gz
recruiting-webapp-46ff88d32324d5100444cb59e07229589a825f49.tar.bz2
recruiting-webapp-46ff88d32324d5100444cb59e07229589a825f49.zip
Don't allow recruits to edit their project acceptances
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project_acceptance.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/project_acceptance.rb b/app/models/project_acceptance.rb
index 1bf4017..121c1ae 100644
--- a/app/models/project_acceptance.rb
+++ b/app/models/project_acceptance.rb
@@ -19,10 +19,9 @@ class ProjectAcceptance < ActiveRecord::Base
# Allow admins everything
return true if acting_user.try.administrator?
- # Allow user (relation), users mentor and recruiters if not accepted and
+ # Allow users mentor and recruiters if not accepted and
# accepted was not changed
- recruiter_user_or_mentor = user_is?(acting_user) ||
- acting_user.try.role.try.is_recruiter? ||
+ recruiter_user_or_mentor = acting_user.try.role.try.is_recruiter? ||
user.try.mentor_is?(acting_user)
return true if recruiter_user_or_mentor && !accepted && !accepted_changed?