Added tests for TypeAccessProvider
Minor changes
Added tests for PermissionsProvider
Fixed several PermissionsProvider issues