Files
openmaxio-object-browser/web-app/build/static/js/4738.f0e4dfe6.chunk.js
2023-12-29 11:44:01 -06:00

2 lines
2.8 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[4738],{84738:(e,t,s)=>{s.r(t),s.d(t,{default:()=>_});var c=s(72791),i=s(78687),n=s(57689),a=s(29945),o=s(31776),r=s(82342),l=s(56087),d=s(38442),u=s(45248),m=s(87995),h=s(9859),S=s(44690),I=s(80184);const _=()=>{const e=(0,S.TL)(),t=(0,n.s0)(),s=(0,n.UO)(),_=(0,i.v9)(h.HQ),[b,F]=(0,c.useState)("simple-tab-0"),[p,L]=(0,c.useState)(!0),[A,g]=(0,c.useState)([]),[k,E]=(0,c.useState)(!0),[U,N]=(0,c.useState)([]),P=s.bucketName||"",f=(0,d.F)(P,[l.Ft.ADMIN_LIST_USER_POLICIES]),T=(0,d.F)(P,[l.Ft.ADMIN_GET_POLICY,l.Ft.ADMIN_LIST_USERS,l.Ft.ADMIN_LIST_GROUPS],!0),C=(0,d.F)(l.C3,[l.Ft.ADMIN_GET_USER]),x=(0,d.F)(l.C3,[l.Ft.ADMIN_GET_POLICY,l.Ft.ADMIN_LIST_USERS,l.Ft.ADMIN_LIST_GROUPS]);(0,c.useEffect)((()=>{_&&(E(!0),L(!0))}),[_,E,L]);const y=[{type:"view",disableButtonFunction:()=>!x,onClick:e=>{t("".concat(l.gA.POLICIES,"/").concat((0,u.LL)(e.name)))}}],D=[{type:"view",disableButtonFunction:()=>!C,onClick:e=>{t("".concat(l.gA.USERS,"/").concat((0,u.LL)(e)))}}];return(0,c.useEffect)((()=>{k&&(T?o.h.bucketUsers.listUsersWithAccessToBucket(P).then((e=>{N(e.data),E(!1)})).catch((t=>{e((0,m.Ih)((0,r.g)(t))),E(!1)})):E(!1))}),[k,e,P,T]),(0,c.useEffect)((()=>{e((0,m.Sc)("bucket_detail_access"))}),[]),(0,c.useEffect)((()=>{p&&(f?o.h.bucketPolicy.listPoliciesWithBucket(P).then((e=>{g(e.data.policies),L(!1)})).catch((t=>{e((0,m.Ih)((0,r.g)(t))),L(!1)})):L(!1))}),[p,e,P,f]),(0,I.jsxs)(c.Fragment,{children:[(0,I.jsx)(a.NZf,{separator:!0,children:(0,I.jsx)(a.SYi,{content:(0,I.jsxs)(c.Fragment,{children:["Understand which"," ",(0,I.jsx)("a",{target:"blank",href:"https://min.io/docs/minio/linux/administration/identity-access-management/policy-based-access-control.html#",children:"Policies"})," ","and"," ",(0,I.jsx)("a",{target:"blank",href:"https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html",children:"Users"})," ","are authorized to access this Bucket."]}),placement:"right",children:"Access Audit"})}),(0,I.jsx)(a.mQc,{currentTabOrPath:b,onTabClick:e=>{F(e)},horizontal:!0,options:[{tabConfig:{label:"Policies",id:"simple-tab-0"},content:(0,I.jsx)(d.s,{scopes:[l.Ft.ADMIN_LIST_USER_POLICIES],resource:P,errorProps:{disabled:!0},children:A&&(0,I.jsx)(a.wQF,{noBackground:!0,itemActions:y,columns:[{label:"Name",elementKey:"name"}],isLoading:p,records:A,entityName:"Policies",idField:"name"})})},{tabConfig:{label:"Users",id:"simple-tab-1"},content:(0,I.jsx)(d.s,{scopes:[l.Ft.ADMIN_GET_POLICY,l.Ft.ADMIN_LIST_USERS,l.Ft.ADMIN_LIST_GROUPS],resource:P,matchAll:!0,errorProps:{disabled:!0},children:(0,I.jsx)(a.wQF,{noBackground:!0,itemActions:D,columns:[{label:"User",elementKey:"accessKey"}],isLoading:k,records:U,entityName:"Users",idField:"accessKey"})})}]})]})}}}]);
//# sourceMappingURL=4738.f0e4dfe6.chunk.js.map