aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 7ff0640..cb6afbe 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -105,7 +105,11 @@ class User < ActiveRecord::Base
end
def mentor_edit_permitted?
- mentor.nil? || mentor_is?(acting_user)
+ return true if mentor_is?(acting_user)
+ return true if mentor.nil? && acting_user.role.is_mentor?
+ return true if mentor.nil? && acting_user.role.is_recruiter?
+ return true if acting_user.administrator?
+ false
end
def destroy_permitted?