+ Start a Discussion
Marcin GlazMarcin Glaz 

Identify and Prevent Sharing Violations how to pass this trailhead

This is my challenge:

Enforce sharing in Apex
Choose the CRUD/FLS & Sharing app in your Kingdom Management Developer Edition org, navigate to the Sharing Challenge tab, and click the Apex Controller link. Spot and fix any sharing violations.
For this module, you can’t use a standard Developer Edition org or Trailhead Playground. You must sign up for a super-special Kingdom Management DE org. Trust us...it’s worth it.
Click the Apex Controller link in the Sharing Challenge tab of the CRUD/FLS & Sharing app
Modify the class definition to prevent sharing violations

I am getting the error:

Challenge not yet complete in super-special Kingdom Management DE
You have not fixed all of the sharing violations. Don't forget about inner classes!

Please pose the code and guide what to do.
Thanks
AnudeepAnudeep (Salesforce Developers) 
Hi Marcin, 

I am seeing the same error with this challenge too

1. I see no inner classes in the CRUD_FLS_Challenge class to extend with sharing
2. Choosing the 'user with no CRUD nor FLS' dropdown when previewing the VF page is giving insufficnent privileges error 
3. I can't pass the challenge even when I give view all/ modify all to the demo user for the contacts and treasure object referenced in the page

There is a separate Trailhead team who can help with such issues. I recommend you reach out to them to resolve this

Anudeep