I think we should use just one flag to differentiate between public / internal, so either change this to check if 'internal' is false (in which case no need to pass any param from the frontend), or change admin to pass origin = 'admin' and in all those places where we check for internal change to check for origin.