Fixing the access control when editing or viewing resources by Ids.