Added CanCan gem to manage authorization.
Added is_manager boolean field to users
Display role information on manage users screen. Hide password fields when editing users. As users should change their own passwords
[Finishes #41220769] Adds authorization. Blocking contributors from deleting data, and accessing some parts of the administration website. Including no access to trade management interface, bulk updates, and core data menu
Moved created and updated info to the right. Hide bin if not a manager
authorize_resource with class set to false, as we don't need to look into objects specifically but rather just to the model
Hide the destroy button from the taxon concepts' list page
Hide is_manager controller if user is not a manager
Fixed the width of the columns on the taxon concepts index page. no need to have actions so wide
Making all users managers makes all admin specs pass
Added helper login_contributor. Added spec to check if contributors can delete taxon_concepts
hide 'manage users' from non-managers
is_manager should default to false and not allow null
Makes sure that authorization is happening correctly on the majority of the controllers. Fixes issue with accessing Names/TaxonQuotas/TaxonEuSuspensions/etc. pages. Still doesn't fix the issue with destroying those records
Set authorization for controllers without direct relation to a Model. Added specs
Removed trailing space
If no referrer set, redirect to admin_root
Created a standard_authorization_controller to instantiate the authorize_resource method from CanCan. Updated taxonomies controller to inherit from it. Updated taxonomies specs to test contributors access
Updated taxon_concept_associated_types_controller to inherit from standard_authorization_Controller, and updated taxon_commons specs
Removed redundant inherited resources. Set the inheritance to the new StandardAuthorizationController where relevant. Or set authorize_resource in the other cases