Skip to content

Commit

Permalink
Change: Move useCapabilities hook to hooks directory
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernricks committed Jun 20, 2024
1 parent 5d09434 commit a017000
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/web/components/powerfilter/dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import React from 'react';

import Layout from 'web/components/layout/layout';

import withFilterDialog from 'web/components/powerfilter/withFilterDialog';
import useCapabilities from 'web/utils/useCapabilities';
import useCapabilities from 'web/hooks/useCapabilities';

import CreateNamedFilterGroup from './createnamedfiltergroup';
import FilterStringGroup from './filterstringgroup';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {describe, test, expect} from '@gsa/testing';

import Capabilities from 'gmp/capabilities/capabilities';

import {rendererWith} from '../testing';
import {rendererWith} from 'web/utils/testing';

import useCapabilities from '../useCapabilities';

Expand All @@ -19,7 +19,7 @@ const TestUseCapabilities = () => {
return <span>Not allowed to create a task</span>;
};

describe('useCapabilties tests', () => {
describe('useCapabilities tests', () => {
test('should be allowed to create a task', () => {
const capabilities = new Capabilities(['create_task']);
const {render} = rendererWith({capabilities});
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/web/pages/extras/trashcanpage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {renewSessionTimeout} from 'web/store/usersettings/actions';
import compose from 'web/utils/compose';
import PropTypes from 'web/utils/proptypes';
import withGmp from 'web/utils/withGmp';
import useCapabilities from 'web/utils/useCapabilities';
import useCapabilities from 'web/hooks/useCapabilities';

import AlertsTable from '../alerts/table';
import ScanConfigsTable from '../scanconfigs/table';
Expand Down
2 changes: 1 addition & 1 deletion src/web/pages/portlists/listpage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {PORTLISTS_FILTER_FILTER} from 'gmp/models/filter';

import {isDefined, hasValue} from 'gmp/utils/identity';

import useCapabilities from 'web/utils/useCapabilities';
import useCapabilities from 'web/hooks/useCapabilities';
import useUserSessionTimeout from 'web/utils/useUserSessionTimeout';

import useGmp from 'web/utils/useGmp';
Expand Down
2 changes: 1 addition & 1 deletion src/web/pages/results/detailspage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import {getUsername} from 'web/store/usersettings/selectors';
import compose from 'web/utils/compose';
import {generateFilename} from 'web/utils/render';
import PropTypes from 'web/utils/proptypes';
import useCapabilities from 'web/utils/useCapabilities';
import useCapabilities from 'web/hooks/useCapabilities';

import NoteComponent from '../notes/component';

Expand Down

0 comments on commit a017000

Please sign in to comment.