Use context to check model and field access

issue4081
review8481002