4teamwork/opengever.core — pull request #716 by lukasgraf (2014-12-19 15:51:01+00:00)
Title: OU selector: Fix fallback logic 

Fixes three aspects of the OU selector:

- **Fallback logic**:
Build intersection of current admin units' org units and user's org units. If some of the user's org units are in the current admin unit, use the first of those as the fallback.

Only of that intersection is empty fall back on the first org unit of the current admin unit (we're in an inter-admin unit operation).

- **Always store selected unit**: If there is org unit set in the cookie, and the fallback logic has to be used to determine the default, store that result in the cookie storage.

- **CookieStorage**: Before the cookies were set to expire at the end of the browser session. In this PR the cookie lifetime is extended to 30 days.