"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[985],{10985:(e,s,i)=>{i.r(s),i.d(s,{default:()=>f});var n=i(65043),t=i(89923),o=i(73216),a=i(77403),c=i(99161),r=i(77938),l=i(64159),d=i(21383),u=i(56629),h=i(64681),m=i(72237),p=i(6681),x=i(48793),A=i(88617),j=i(70579);const b=(0,m.A)(n.lazy((()=>i.e(4676).then(i.bind(i,4676))))),f=()=>{const e=(0,d.jL)(),s=(0,o.Zp)(),[i,m]=(0,n.useState)([]),[f,I]=(0,n.useState)(!1),[y,C]=(0,n.useState)(!1),[M,P]=(0,n.useState)(""),[_,v]=(0,n.useState)(""),O=(0,r._)(c.Ms,[c.OV.ADMIN_GET_POLICY]),S=(0,r._)(c.Ms,c.uA),E=(0,r._)(c.Ms,c.Bc),g=(0,r._)(c.Ms,c.nr),L=(0,r._)(c.Ms,c.yv);(0,n.useEffect)((()=>{k()}),[]),(0,n.useEffect)((()=>{f&&(E?u.F.policies.listPolicies().then((e=>{var s;const i=null!==(s=e.data.policies)&&void 0!==s?s:[];i.sort(((e,s)=>e.name>s.name?1:e.name<s.name?-1:0)),I(!1),m(i)})).catch((s=>{I(!1),e((0,l.C9)(s))})):I(!1))}),[f,I,m,e,E]);const k=()=>{I(!0)},w=[{type:"view",onClick:e=>{s(`${c.zZ.POLICIES}/${encodeURIComponent(e.name)}`)},disableButtonFunction:()=>!O},{type:"delete",onClick:e=>{C(!0),P(e)},sendOnlyId:!0,disableButtonFunction:()=>!S}],R=i.filter((e=>{var s;return null===(s=e.name)||void 0===s?void 0:s.includes(_)}));return(0,n.useEffect)((()=>{e((0,l.ph)("list_policies"))}),[]),(0,j.jsxs)(n.Fragment,{children:[y&&(0,j.jsx)(b,{deleteOpen:y,selectedPolicy:M,closeDeleteModalAndRefresh:e=>{C(!1),e&&k()}}),(0,j.jsx)(x.A,{label:"IAM Policies",actions:(0,j.jsx)(A.A,{})}),(0,j.jsx)(t.Mxu,{children:(0,j.jsxs)(t.xA9,{container:!0,children:[(0,j.jsxs)(t.xA9,{item:!0,xs:12,sx:a._0.actionsTray,children:[(0,j.jsx)(h.A,{onChange:v,placeholder:"Search Policies",value:_,sx:{maxWidth:380}}),(0,j.jsx)(r.R,{scopes:[c.OV.ADMIN_CREATE_POLICY],resource:c.Ms,errorProps:{disabled:!0},children:(0,j.jsx)(p.A,{tooltip:g?"":(0,c.vj)(c.nr,"create a Policy"),children:(0,j.jsx)(t.$nd,{id:"create-policy",label:"Create Policy",variant:"callAction",icon:(0,j.jsx)(t.REV,{}),onClick:()=>{s(`${c.zZ.POLICY_ADD}`)},disabled:!g})})})]}),(0,j.jsx)(t.xA9,{item:!0,xs:12,children:(0,j.jsx)(r.R,{scopes:[c.OV.ADMIN_LIST_USER_POLICIES],resource:c.Ms,errorProps:{disabled:!0},children:(0,j.jsx)(p.A,{tooltip:L?"":(0,c.vj)(c.yv,"view Policy details"),children:(0,j.jsx)(t.bQt,{itemActions:w,columns:[{label:"Name",elementKey:"name"}],isLoading:f,records:R,entityName:"Policies",idField:"name"})})})}),(0,j.jsx)(t.xA9,{item:!0,xs:12,sx:{marginTop:15},children:(0,j.jsx)(t.lVp,{title:"Learn more about IAM POLICIES",iconComponent:(0,j.jsx)(t.n$X,{}),help:(0,j.jsxs)(n.Fragment,{children:["MinIO uses Policy-Based Access Control (PBAC) to define the authorized actions and resources to which an authenticated user has access. Each policy describes one or more actions and conditions that outline the permissions of a user or group of users.",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"MinIO PBAC is built for compatibility with AWS IAM policy syntax, structure, and behavior. The MinIO documentation makes a best-effort to cover IAM-specific behavior and functionality. Consider deferring to the IAM documentation for more complete documentation on AWS IAM-specific topics.",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"You can learn more at our"," ",(0,j.jsx)("a",{href:"https://min.io/docs/minio/linux/administration/identity-access-management.html?ref=con#access-management",target:"_blank",rel:"noopener",children:"documentation"}),"."]})})})]})})]})}}}]);
//# sourceMappingURL=985.46ebf89c.chunk.js.map