app/lib/masquerade.rb
# Raise if:
# - they don't have access
# - if they're already masquerading as someone else (clear first)
# - they are trying to masquerade as themselves (potential for confusion)
Raise if:
they don't have access
if they're already masquerading as someone else (clear first)
they are trying to masquerade as themselves (potential for confusion)
Raise if : they don ' t have access if they ' re already masquerading as someone else ( clear first ) they are trying to masquerade as themselves ( potential for confusion )
def become_educator_id!(masquerading_educator_id)
    raise Exceptions::EducatorNotAuthorized unless authorized?
    raise Exceptions::EducatorNotAuthorized if is_masquerading?
    raise Exceptions::EducatorNotAuthorized if masquerading_educator_id == underlying_current_educator.id
    log_become_educator_id!(masquerading_educator_id)
    @session[@session_key] = masquerading_educator_id
    nil
  end
def become_educator_id! ( masquerading_educator_id ) raise Exceptions :: EducatorNotAuthorized unless authorized? raise Exceptions :: EducatorNotAuthorized if is_masquerading? raise Exceptions :: EducatorNotAuthorized if masquerading_educator_id == underlying_current_educator . id log_become_educator_id! ( masquerading_educator_id ) @session [ @session_key ] = masquerading_educator_id nil end
Raise if:
 they don't have access
 if they're already masquerading as someone else (clear first)
 they are trying to masquerade as themselves (potential for confusion)
Raise if : they don ' t have access if they ' re already masquerading as someone else ( clear first ) they are trying to masquerade as themselves ( potential for confusion )
masquerading_educator_id
<not_specific>