Fix for issue associated with super-admins and department affiliation in a given organisation. (#2165)
Changes made:
  - Department policies now allow both org admins and super admins to
    create update and delete departments, whilst org_admins can only do this
    for their own org. Super admins can do it for any org department.
  - When a super admin switches organisation their department_id is cleared.

Fix for issue #2088.
dev
1 parent 29ce258 commit 6e6f25421b029d517a7680103fab607bd8c43a5e
@John Pinto John Pinto authored on 20 Jun 2019
Sam Rust committed on 20 Jun 2019
Showing 3 changed files
View
app/models/user.rb
View
app/policies/department_policy.rb
View
app/views/devise/registrations/_personal_details.html.erb