Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#953] Fix display or Organization and Visibility dropdowns
Fix the logic for displaying the Organization and Visibility dropdowns when creating or updating a dataset. We really need frontend tests for this. I tested these cases manually: User is not logged in and anon_create_dataset = True: neither Organization nor Visibility shows, either when creating or when updating a dataset. User is logged in, but is not a member of any organization: neither Organization nor Visibility shows, either when creating or when updating a dataset. Tested both when the site has no organizations and when the site does have orgs but user is not a member of any. User is logged in, and is a member of an organization: Both Organization and Visibility show when creating a dataset. When creating a private dataset, no activities appear in the activity stream. User is logged in, and is a member of an organization, but dataset is not a member of any org: neither Organization nor Visibility shows when updating a dataset. User is logged in, and is a member of an organization, and dataset is a member of any org: Visibility shows but Organization does not show when updating a dataset. User is sysadmin, site has no orgs: neither Organization nor Visibility shows when creating or updating a dataset. User is sysadmin, site does have orgs: both Organization and Visibility show when creating or updating a dataset.
- Loading branch information
Variable dataset_has_organization is declared but variable existing_org is used on line 69. This is causing the organisation dropdown to not select any value when you are a sysadmin editing package metadata.
Fixed in 0405c3f but needs to be backported to 2.1