Disabling context menus of a panel in view-only mode for a user

Is there a way to disable the context menus of a panel when a user who is view-only has logged in?