Atlas-Assistance-Dogs / atlas-dogs

Repository for Atlas Dogs flows in Salesforce
1 stars 1 forks source link

permission error editing tasks- prod 1.9 #563

Closed atlasjen closed 3 weeks ago

atlasjen commented 1 month ago

This is in prod 1.9. Molly just let me know she tried to edit a comment on a task and got an error. I was able to do an edit as my user, but when i logged in as her i was able to reproduce it.

image

atlasjen commented 1 month ago

this is a task Laura created and assigned to herself. Molly cannot edit the comments on it.

Molly is able to edit comments on her own tasks.

atlasjen commented 3 weeks ago

Adding in feedback from support here: We enabled logging and had molly directly reproduce. interestingly me logged in as her didn't create the same error logs. There are several logs here: https://atlasassistancedogs.lightning.force.com/lightning/setup/ApexDebugLogs/home

this is the only one with an error: image

and here is a screen shot of the that one

image

support said to see if there is a field in the query that molly might not have access to. apparently tasks inherit permissions from the contact they are on.

this is a pretty common workflow use case for molly and laura, so it would be good to figure out as soon as we can. support isn't going to go any further in debugging from what i can tell, as this relates to a custom managed package.

deb761 commented 3 weeks ago

I found the bit of code that the log is referencing, and:

  1. Notice the Success status, there is NO error.
  2. The log has a return for a SOQL statement with one record.
  3. The SOQL statement is in the PositionStatusController, which shows the status for each position in the record page, nothing associated with Tasks here.

I will see if I can reproduce this in a scratch org.

atlasjen commented 3 weeks ago

Yeah, I noticed that as well re no errors. The support person’s view was this is the only data that was reported when doing the action, so she thought that was likely the cause of the error… but indeed, the error isn’t logged

From: Deborah Engelmeyer @.> Sent: Sunday, August 18, 2024 12:45 PM To: Atlas-Assistance-Dogs/atlas-dogs @.> Cc: Jennifer Kolar @.>; Author @.> Subject: Re: [Atlas-Assistance-Dogs/atlas-dogs] permission error editing tasks- prod 1.9 (Issue #563)

I found the bit of code that the log is referencing, and:

  1. Notice the Success status, there is NO error.
  2. The log has a return for a SOQL statement with one record.
  3. The SOQL statement is in the PositionStatusController, which shows the status for each position in the record page, nothing associated with Tasks here.

I will see if I can reproduce this in a scratch org.

— Reply to this email directly, view it on GitHubhttps://github.com/Atlas-Assistance-Dogs/atlas-dogs/issues/563#issuecomment-2295369369, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APYTKLIRMMNFK35Y3JGFHCTZSD2SLAVCNFSM6AAAAABMM6Q53GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM3DSMZWHE. You are receiving this because you authored the thread.Message ID: @.**@.>>

deb761 commented 3 weeks ago

I did a bit of research, and the edit error Molly bumped into has absolutely nothing to do with the managed package, which has no Tasks defined directly, but everything to do with how Salesforce provides access to Tasks:

https://help.salesforce.com/s/articleView?id=000385354&type=1

I solved the problem by changing Activity permissions to Controlled by parent.

atlasjen commented 3 weeks ago

woot! confirming this is happy in prod. closing. this release is done :)