"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[985],{10985:(e,s,n)=>{n.r(s),n.d(s,{default:()=>f});var t=n(65043),i=n(89923),o=n(73216),c=n(77403),a=n(99161),r=n(77938),l=n(64159),d=n(20554),u=n(56629),h=n(64681),m=n(72237),p=n(6681),x=n(48793),A=n(55968),j=n(70579);const b=(0,m.A)(t.lazy((()=>n.e(4676).then(n.bind(n,4676))))),f=()=>{const e=(0,d.jL)(),s=(0,o.Zp)(),[n,m]=(0,t.useState)([]),[f,I]=(0,t.useState)(!1),[y,C]=(0,t.useState)(!1),[M,P]=(0,t.useState)(""),[_,v]=(0,t.useState)(""),O=(0,r._)(a.Ms,[a.OV.ADMIN_GET_POLICY]),S=(0,r._)(a.Ms,a.uA),E=(0,r._)(a.Ms,a.Bc),g=(0,r._)(a.Ms,a.nr),L=(0,r._)(a.Ms,a.yv);(0,t.useEffect)((()=>{k()}),[]),(0,t.useEffect)((()=>{f&&(E?u.F.policies.listPolicies().then((e=>{var s;const n=null!==(s=e.data.policies)&&void 0!==s?s:[];n.sort(((e,s)=>e.name>s.name?1:e.name<s.name?-1:0)),I(!1),m(n)})).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("".concat(a.zZ.POLICIES,"/").concat(encodeURIComponent(e.name)))},disableButtonFunction:()=>!O},{type:"delete",onClick:e=>{C(!0),P(e)},sendOnlyId:!0,disableButtonFunction:()=>!S}],R=n.filter((e=>{var s;return null===(s=e.name)||void 0===s?void 0:s.includes(_)}));return(0,t.useEffect)((()=>{e((0,l.ph)("list_policies"))}),[]),(0,j.jsxs)(t.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)(i.Mxu,{children:(0,j.jsxs)(i.xA9,{container:!0,children:[(0,j.jsxs)(i.xA9,{item:!0,xs:12,sx:c._0.actionsTray,children:[(0,j.jsx)(h.A,{onChange:v,placeholder:"Search Policies",value:_,sx:{maxWidth:380}}),(0,j.jsx)(r.R,{scopes:[a.OV.ADMIN_CREATE_POLICY],resource:a.Ms,errorProps:{disabled:!0},children:(0,j.jsx)(p.A,{tooltip:g?"":(0,a.vj)(a.nr,"create a Policy"),children:(0,j.jsx)(i.$nd,{id:"create-policy",label:"Create Policy",variant:"callAction",icon:(0,j.jsx)(i.REV,{}),onClick:()=>{s("".concat(a.zZ.POLICY_ADD))},disabled:!g})})})]}),(0,j.jsx)(i.xA9,{item:!0,xs:12,children:(0,j.jsx)(r.R,{scopes:[a.OV.ADMIN_LIST_USER_POLICIES],resource:a.Ms,errorProps:{disabled:!0},children:(0,j.jsx)(p.A,{tooltip:L?"":(0,a.vj)(a.yv,"view Policy details"),children:(0,j.jsx)(i.bQt,{itemActions:w,columns:[{label:"Name",elementKey:"name"}],isLoading:f,records:R,entityName:"Policies",idField:"name"})})})}),(0,j.jsx)(i.xA9,{item:!0,xs:12,sx:{marginTop:15},children:(0,j.jsx)(i.lVp,{title:"Learn more about IAM POLICIES",iconComponent:(0,j.jsx)(i.n$X,{}),help:(0,j.jsxs)(t.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.c802474d.chunk.js.map