feat(Can): use new manage permission in checks
This commit is contained in:
@@ -139,7 +139,7 @@ export default function Application() {
|
||||
<Route
|
||||
path={`${URLS.FLOWS}/*`}
|
||||
element={
|
||||
<Can I="create" a="Flow" passThrough>
|
||||
<Can I="manage" a="Flow" passThrough>
|
||||
{(allowed) => (
|
||||
<ConditionalIconButton
|
||||
type="submit"
|
||||
@@ -162,7 +162,7 @@ export default function Application() {
|
||||
<Route
|
||||
path={`${URLS.CONNECTIONS}/*`}
|
||||
element={
|
||||
<Can I="create" a="Connection" passThrough>
|
||||
<Can I="manage" a="Connection" passThrough>
|
||||
{(allowed) => (
|
||||
<SplitButton
|
||||
disabled={!allowed}
|
||||
@@ -248,7 +248,7 @@ export default function Application() {
|
||||
<Route
|
||||
path="/connections/add"
|
||||
element={
|
||||
<Can I="create" a="Connection">
|
||||
<Can I="manage" a="Connection">
|
||||
<AddAppConnection
|
||||
onClose={goToApplicationPage}
|
||||
application={app}
|
||||
@@ -260,7 +260,7 @@ export default function Application() {
|
||||
<Route
|
||||
path="/connections/:connectionId/reconnect"
|
||||
element={
|
||||
<Can I="create" a="Connection">
|
||||
<Can I="manage" a="Connection">
|
||||
<ReconnectConnection
|
||||
application={app}
|
||||
onClose={goToApplicationPage}
|
||||
|
||||
@@ -53,7 +53,7 @@ export default function Applications() {
|
||||
alignItems="center"
|
||||
order={{ xs: 1, sm: 2 }}
|
||||
>
|
||||
<Can I="create" a="Connection" passThrough>
|
||||
<Can I="manage" a="Connection" passThrough>
|
||||
{(allowed) => (
|
||||
<ConditionalIconButton
|
||||
type="submit"
|
||||
@@ -84,7 +84,7 @@ export default function Applications() {
|
||||
)}
|
||||
|
||||
{!isLoading && !hasApps && (
|
||||
<Can I="create" a="Connection" passThrough>
|
||||
<Can I="manage" a="Connection" passThrough>
|
||||
{(allowed) => (
|
||||
<NoResultFound
|
||||
text={formatMessage('apps.noConnections')}
|
||||
|
||||
@@ -125,7 +125,7 @@ export default function CreateUser() {
|
||||
helperText={errors?.email?.message}
|
||||
/>
|
||||
|
||||
<Can I="update" a="Role">
|
||||
<Can I="manage" a="Role">
|
||||
<ControlledAutocomplete
|
||||
name="roleId"
|
||||
fullWidth
|
||||
|
||||
@@ -169,7 +169,7 @@ export default function EditUser() {
|
||||
helperText={errors?.email?.message}
|
||||
/>
|
||||
|
||||
<Can I="update" a="Role">
|
||||
<Can I="manage" a="Role">
|
||||
<ControlledAutocomplete
|
||||
name="roleId"
|
||||
fullWidth
|
||||
|
||||
Reference in New Issue
Block a user