Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Personalized Communication History View Message Button Permissions Not working correctly #5379

Closed
1 task done
JoshuaMaiorino opened this issue Apr 6, 2023 · 0 comments
Closed
1 task done

Comments

@JoshuaMaiorino
Copy link
Contributor

JoshuaMaiorino commented Apr 6, 2023

Please go through all the tasks below

  • Check this box only after you have successfully completed both the above tasks

Please provide a brief description of the problem. Please do not forget to attach the relevant screenshots from your side.

On the person history tab, the "View Message" button isn't showing in some cases even when the communication was created by the given user. Upon review of the code I uncovered a logic error by which permissions are checking the current person's Alias Id compared to the Created By Person Alias Id. This logic should be checking the person Id related to those aliases. Also, Some might contest it should also be checking the sender, because the sender should also have permission to see the Communication details.

|| ( CurrentPersonAliasId != null && info.CreatedByPersonAliasId != null && info.CreatedByPersonAliasId.Value == CurrentPersonAliasId.Value );

Expected Behavior

If the current user created or sent the communication in question, They should have permissions to see the detail, i.e. The 'View Message' button should render.

Actual Behavior

If the Person's Primary Alias differs from the alias that created the communication, or the person is the sender not the creator, the button doesn't render.

Steps to Reproduce

Have a communication created by person, perform a merge on that profile to the point where the primary alias changes.
Attempt to view the communication that was created via the Personalized Communication History Block.

Rock Version

14.2

Client Culture Setting

en-us

MrUpsideDown added a commit that referenced this issue Apr 13, 2023
…to correctly apply view security for merged Person records. (Fixes #5379)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants