Commit Graph

1 Commits

Author SHA1 Message Date
Jon Jensen a8dc1c32da filter conversations while masquerading, fixes #7634
start tracking root_account_ids more consistently for messages, and
aggregate them on the conversation. add a scope when masquerading such
that conversations tied to other root accounts are hidden. a masquerader
must have access to all root accounts a conversation belongs to in order
to see it (unless the masquerader is a site admin)

test plan:

1. enroll a user in courses under two different root accounts (let's call
   them accounts A and B)
2. as the user, log in under the account domain for A and send some
   messages
3. log in under the account domain for B and send some messages to
   the existing conversations, as well as to some new recipients
4. set up an account admin with access only to B
5. log in as the admin, and masquerade as the user
6. ensure you can only see conversations created under B (none of the ones
   that are solely A, or both A and B)
7. log in as a site admin, and masquerade as the user
8. ensure you can see conversations from both accounts

Change-Id: I4a26b8b8914fd531103bb92c3d4442de843d9986
Reviewed-on: https://gerrit.instructure.com/9767
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
2012-04-06 13:49:47 -06:00