diff --git a/src/pages/SecurityLogPage/index.tsx b/src/pages/SecurityLogPage/index.tsx index f48f057..dc994d6 100644 --- a/src/pages/SecurityLogPage/index.tsx +++ b/src/pages/SecurityLogPage/index.tsx @@ -33,7 +33,7 @@ const SecurityLogPage = () => { const [currentPage, setCurrentPage] = useState(1) const isLoading = isUsersLoading || isLoadingLogs - const isPageAvailable = hasPermission(PermissionKeysType.read) + const isPageAvailable = hasPermission(PermissionKeysType.security_log_view) useEffect(() => { getAllLogs({ limit, offset: 0 }) diff --git a/src/pages/SessionsPage/index.tsx b/src/pages/SessionsPage/index.tsx index 74d9661..c967375 100644 --- a/src/pages/SessionsPage/index.tsx +++ b/src/pages/SessionsPage/index.tsx @@ -14,8 +14,6 @@ import { useNavigate } from 'react-router-dom' import { SessionStatusKeysType, sessionStatuses } from '@constants/statuses' -import CanEdit from '@components/CanEdit' - import { getUserFullName } from '@utils/userUtils/getFullNameUtil' import useRole from '@hooks/useRole' @@ -47,7 +45,8 @@ const SessionsPage = () => { const isLoading = isUsersLoading || isLoadingSession - const isPageAvailable = hasPermission(PermissionKeysType.read) + const isPageAvailable = hasPermission(PermissionKeysType.session_view) + const hasRevokePermission = hasPermission(PermissionKeysType.session_revoke) useEffect(() => { if (!isPageAvailable) { @@ -124,7 +123,7 @@ const SessionsPage = () => { } return ( <> - + {hasRevokePermission && ( handleRevokeSessions(record.id)} @@ -136,7 +135,7 @@ const SessionsPage = () => { /> - + )} ) }