set object level permissions to the detail view with a custome class