Skip to content

Commit

Permalink
console: display rows limit in permissions editor if set to zero (fix h…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandra Sikora committed May 12, 2020
1 parent 619553e commit 2a41fac
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Read more about the session argument for computed fields in the [docs](https://h

- console: avoid count queries for large tables (#4692)
- console: add read replica support section to pro popup (#4118)
- console: display rows limit in permissions editor if set to zero (fix #4559)
- cli: list all avialable commands in root command help (fix #4623)

## `v1.2.0`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import {
isEmpty,
isJsonString,
isObject,
exists,
} from '../../../Common/utils/jsUtils';
import {
findTable,
Expand All @@ -82,7 +83,7 @@ import {
QUERY_TYPES,
} from '../../../Common/utils/pgUtils';
import { showErrorNotification } from '../../Common/Notification';
import KnowMoreLink from "../../../Common/KnowMoreLink/KnowMoreLink";
import KnowMoreLink from '../../../Common/KnowMoreLink/KnowMoreLink';
import {
getFilterQueries,
replaceLegacyOperators,
Expand Down Expand Up @@ -597,12 +598,14 @@ class Permissions extends Component {
}

let knowMoreHtml;
if(knowMoreRef) {
if (knowMoreRef) {
knowMoreHtml = (
<span className={`${styles.add_mar_left_small} ${styles.sectionStatus}`}>
<KnowMoreLink href={knowMoreRef}/>
<span
className={`${styles.add_mar_left_small} ${styles.sectionStatus}`}
>
<KnowMoreLink href={knowMoreRef} />
</span>
)
);
}

return (
Expand Down Expand Up @@ -866,7 +869,7 @@ class Permissions extends Component {

if (query === 'select') {
const limitValue =
permissionsState.select && permissionsState.select.limit
permissionsState.select && exists(permissionsState.select.limit)
? permissionsState.select.limit
: '';

Expand Down Expand Up @@ -1842,14 +1845,21 @@ class Permissions extends Component {
const backendStatus = isBackendOnly ? 'enabled' : 'disabled';
return (
<CollapsibleToggle
title={getSectionHeader('Backend only', tooltip, backendStatus, 'https://docs.hasura.io/1.0/graphql/manual/auth/authorization/permission-rules.html#backend-only-inserts')}
title={getSectionHeader(
'Backend only',
tooltip,
backendStatus,
'https://docs.hasura.io/1.0/graphql/manual/auth/authorization/permission-rules.html#backend-only-inserts'
)}
useDefaultTitleStyle
testId={'toggle-backend-only'}
>
<div
className={`${styles.editPermsSection} ${styles.display_flex}`}
>
<div className={`${styles.display_flex} ${styles.add_mar_right_mid}`}>
<div
className={`${styles.display_flex} ${styles.add_mar_right_mid}`}
>
<Toggle
checked={isBackendOnly}
onChange={() => dispatch(permToggleBackendOnly())}
Expand Down

0 comments on commit 2a41fac

Please sign in to comment.