Adding secureComponent to groups and buckets description message (#1243)

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Lenin Alevski
2021-11-19 15:55:48 -08:00
committed by GitHub
parent f56b4905c9
commit 1fa4d19e93
2 changed files with 41 additions and 24 deletions

View File

@@ -382,17 +382,21 @@ const ListBuckets = ({
MinIO uses buckets to organize objects. A bucket is
similar to a folder or directory in a filesystem, where
each bucket can hold an arbitrary number of objects.
<br />
<br />
To get started,&nbsp;
<AButton
onClick={() => {
history.push("/add-bucket");
}}
<SecureComponent
scopes={[IAM_SCOPES.S3_CREATE_BUCKET]}
resource={CONSOLE_UI_RESOURCE}
>
Create a Bucket.
</AButton>
refresh
<br />
<br />
To get started,&nbsp;
<AButton
onClick={() => {
history.push("/add-bucket");
}}
>
Create a Bucket.
</AButton>
</SecureComponent>
</Fragment>
}
/>

View File

@@ -199,11 +199,18 @@ const Groups = ({ classes, setErrorSnackMessage }: IGroupsProps) => {
<PageLayout>
<Grid item xs={12} className={classes.actionsTray}>
<SearchBox
placeholder={"Search Groups"}
onChange={setFilter}
classes={classes}
/>
<SecureComponent
resource={CONSOLE_UI_RESOURCE}
scopes={[IAM_SCOPES.ADMIN_LIST_GROUPS]}
errorProps={{ disabled: true }}
>
<SearchBox
placeholder={"Search Groups"}
onChange={setFilter}
classes={classes}
/>
</SecureComponent>
<SecureComponent
resource={CONSOLE_UI_RESOURCE}
scopes={[
@@ -231,14 +238,20 @@ const Groups = ({ classes, setErrorSnackMessage }: IGroupsProps) => {
{records.length > 0 && (
<Fragment>
<Grid item xs={12} className={classes.tableBlock}>
<TableWrapper
itemActions={tableActions}
columns={[{ label: "Name", elementKey: "" }]}
isLoading={loading}
records={filteredRecords}
entityName="Groups"
idField=""
/>
<SecureComponent
resource={CONSOLE_UI_RESOURCE}
scopes={[IAM_SCOPES.ADMIN_LIST_GROUPS]}
errorProps={{ disabled: true }}
>
<TableWrapper
itemActions={tableActions}
columns={[{ label: "Name", elementKey: "" }]}
isLoading={loading}
records={filteredRecords}
entityName="Groups"
idField=""
/>
</SecureComponent>
</Grid>
<Grid item xs={12}>
<HelpBox
@@ -285,7 +298,7 @@ const Groups = ({ classes, setErrorSnackMessage }: IGroupsProps) => {
Groups support more simplified management of user
permissions on the MinIO Tenant.
<SecureComponent
resource="console-ui"
resource={CONSOLE_UI_RESOURCE}
scopes={[
IAM_SCOPES.ADMIN_ADD_USER_TO_GROUP,
IAM_SCOPES.ADMIN_LIST_USERS,