Skip to content

User must be able to read Current.organization

Gitlab::Current::Organization should ensure that when a User is provided, the Organization is always one of the User's organization memberships. Except in the case of admin.

We achieve this using something like can?(:read, organization) from within Gitlab::Current::Organization.

If the User can't access the organization Current.organization should return nil.

Edited by Alex Pooley