"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[3728],{23728:(e,i,s)=>{s.r(i),s.d(i,{default:()=>I});var t=s(69060),n=s(66152),c=s(51560),o=s(61628),a=s(21124),r=s(3992),l=s(61060),d=s(95705),u=s(66156),m=s(61180),h=s(86116),p=s(99748),x=s(84612),b=s(3428),j=s(48504),f=s(82496);const y=(0,p.c)(t.lazy((()=>s.e(1064).then(s.bind(s,31064))))),I=()=>{const e=(0,u.Ab)(),i=(0,c.i6)(),[s,p]=(0,t.useState)([]),[I,A]=(0,t.useState)(!1),[C,P]=(0,t.useState)(!1),[O,S]=(0,t.useState)(""),[_,v]=(0,t.useState)(""),M=(0,r.i)(a.Gc,[a.Oi.ADMIN_GET_POLICY]),g=(0,r.i)(a.Gc,a.UV),E=(0,r.i)(a.Gc,a.aY),k=(0,r.i)(a.Gc,a.lp),w=(0,r.i)(a.Gc,a.ew);(0,t.useEffect)((()=>{L()}),[]),(0,t.useEffect)((()=>{I&&(E?m.m.policies.listPolicies().then((e=>{var i;const s=null!==(i=e.data.policies)&&void 0!==i?i:[];s.sort(((e,i)=>e.name>i.name?1:e.name<i.name?-1:0)),A(!1),p(s)})).catch((i=>{A(!1),e((0,d.aW)(i))})):A(!1))}),[I,A,p,e,E]);const L=()=>{A(!0)},G=[{type:"view",onClick:e=>{i("".concat(a.Ks.POLICIES,"/").concat((0,l.CO)(e.name)))},disableButtonFunction:()=>!M},{type:"delete",onClick:e=>{P(!0),S(e)},sendOnlyId:!0,disableButtonFunction:()=>!g}],N=s.filter((e=>{var i;return null===(i=e.name)||void 0===i?void 0:i.includes(_)}));return(0,t.useEffect)((()=>{e((0,d.i8)("list_policies"))}),[]),(0,f.jsxs)(t.Fragment,{children:[C&&(0,f.jsx)(y,{deleteOpen:C,selectedPolicy:O,closeDeleteModalAndRefresh:e=>{P(!1),e&&L()}}),(0,f.jsx)(b.c,{label:"IAM Policies",actions:(0,f.jsx)(j.c,{})}),(0,f.jsx)(n._al,{children:(0,f.jsxs)(n.yeN,{container:!0,children:[(0,f.jsxs)(n.yeN,{item:!0,xs:12,sx:o.GR.actionsTray,children:[(0,f.jsx)(h.c,{onChange:v,placeholder:"Search Policies",value:_,sx:{maxWidth:380}}),(0,f.jsx)(r.K,{scopes:[a.Oi.ADMIN_CREATE_POLICY],resource:a.Gc,errorProps:{disabled:!0},children:(0,f.jsx)(x.c,{tooltip:k?"":(0,a.q4)(a.lp,"create a Policy"),children:(0,f.jsx)(n.qaq,{id:"create-policy",label:"Create Policy",variant:"callAction",icon:(0,f.jsx)(n.EgV,{}),onClick:()=>{i("".concat(a.Ks.POLICY_ADD))},disabled:!k})})})]}),(0,f.jsx)(n.yeN,{item:!0,xs:12,children:(0,f.jsx)(r.K,{scopes:[a.Oi.ADMIN_LIST_USER_POLICIES],resource:a.Gc,errorProps:{disabled:!0},children:(0,f.jsx)(x.c,{tooltip:w?"":(0,a.q4)(a.ew,"view Policy details"),children:(0,f.jsx)(n.iSL,{itemActions:G,columns:[{label:"Name",elementKey:"name"}],isLoading:I,records:N,entityName:"Policies",idField:"name"})})})}),(0,f.jsx)(n.yeN,{item:!0,xs:12,sx:{marginTop:15},children:(0,f.jsx)(n.g1k,{title:"Learn more about IAM POLICIES",iconComponent:(0,f.jsx)(n.u_c,{}),help:(0,f.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,f.jsx)("br",{}),(0,f.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,f.jsx)("br",{}),(0,f.jsx)("br",{}),"You can learn more at our"," ",(0,f.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=3728.619f9f58.chunk.js.map