Current User is not initialized when Current.organization is set in REST API
In #474831 (closed) , we added the logic for setting Current.organization
. This logic has an dependency on current_user
. When we want to set Current.organization
, current_user
is still nil
, even we when an API token is used
@tachyons-gitlab (Thanks for raising this) tried a MR that solves this by changing @current_user
into current_user
but this causes other issues: some endpoints use different authentication. See output of this job
So we need to fix the way we set Current.organization
in REST API
Since we fallback for now to Default Organization
, this is not broken, but we need to address this for Cells 1.0