feat(annotations): security permissions simplification (#12014)

* Changed security permissions for annotations and annotation layers

* Updated permissions in annotation layers list

* Created test for retrieving premissions info. Updated uris from f-strings to strings

* Updated annotations in security_tests and added annotations to NEW_SECURITY_CONVERGE_VIEWS

* Added migration for annotations security converge

* Updated current revision after rebase master

* Updated migration name to annotations security converge

* Updated annotations permissions names in AnnotationLayersList and updated test since 'can_write' has wider permissions

* Updated annotations migration to current
This commit is contained in:
Kasia Kucharczyk
2020-12-16 10:08:06 +01:00
committed by GitHub
parent 0ee03ae440
commit 9c8b65d03f
8 changed files with 124 additions and 15 deletions

View File

@@ -61,7 +61,7 @@ const mockUser = {
};
fetchMock.get(layersInfoEndpoint, {
permissions: ['can_delete'],
permissions: ['can_write'],
});
fetchMock.get(layersEndpoint, {
result: mocklayers,
@@ -156,7 +156,7 @@ describe('AnnotationLayersList', () => {
});
it('shows/hides bulk actions when bulk actions is clicked', async () => {
const button = wrapper.find(Button).at(0);
const button = wrapper.find(Button).at(1);
act(() => {
button.props().onClick();
});