"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[4874],{94874:function(e,n,t){t.r(n);var i=t(29439),o=t(72791),s=t(29945),c=t(57689),a=t(23814),r=t(56087),l=t(38442),u=t(45248),d=t(87995),h=t(81551),f=t(31776),m=t(59114),x=t(75578),p=t(27454),j=t(47974),C=t(99670),b=t(80184),I=(0,x.Z)(o.lazy((function(){return t.e(312).then(t.bind(t,312))})));n.default=function(){var e=(0,h.TL)(),n=(0,c.s0)(),t=(0,o.useState)([]),x=(0,i.Z)(t,2),A=x[0],P=x[1],y=(0,o.useState)(!1),M=(0,i.Z)(y,2),v=M[0],Z=M[1],F=(0,o.useState)(!1),S=(0,i.Z)(F,2),g=S[0],E=S[1],L=(0,o.useState)(""),O=(0,i.Z)(L,2),_=O[0],k=O[1],D=(0,o.useState)(""),w=(0,i.Z)(D,2),T=w[0],B=w[1],K=(0,l.F)(r.C3,[r.Ft.ADMIN_GET_POLICY]),N=(0,l.F)(r.C3,r.bE),R=(0,l.F)(r.C3,r.K$),X=(0,l.F)(r.C3,r.XM),Y=(0,l.F)(r.C3,r.GD);(0,o.useEffect)((function(){z()}),[]),(0,o.useEffect)((function(){v&&(R?f.h.policies.listPolicies().then((function(e){var n,t=null!==(n=e.data.policies)&&void 0!==n?n:[];t.sort((function(e,n){return e.name>n.name?1:e.name<n.name?-1:0})),Z(!1),P(t)})).catch((function(n){Z(!1),e((0,d.Ih)(n))})):Z(!1))}),[v,Z,P,e,R]);var z=function(){Z(!0)},G=[{type:"view",onClick:function(e){n("".concat(r.gA.POLICIES,"/").concat((0,u.LL)(e.name)))},disableButtonFunction:function(){return!K}},{type:"delete",onClick:function(e){E(!0),k(e)},sendOnlyId:!0,disableButtonFunction:function(){return!N}}],W=A.filter((function(e){var n;return null===(n=e.name)||void 0===n?void 0:n.includes(T)}));return(0,o.useEffect)((function(){e((0,d.Sc)("list_policies"))}),[]),(0,b.jsxs)(o.Fragment,{children:[g&&(0,b.jsx)(I,{deleteOpen:g,selectedPolicy:_,closeDeleteModalAndRefresh:function(e){E(!1),e&&z()}}),(0,b.jsx)(j.Z,{label:"IAM Policies",actions:(0,b.jsx)(C.Z,{})}),(0,b.jsx)(s.Xgh,{children:(0,b.jsxs)(s.rjZ,{container:!0,children:[(0,b.jsxs)(s.rjZ,{item:!0,xs:12,sx:a.OR.actionsTray,children:[(0,b.jsx)(m.Z,{onChange:B,placeholder:"Search Policies",value:T,sx:{maxWidth:380}}),(0,b.jsx)(l.s,{scopes:[r.Ft.ADMIN_CREATE_POLICY],resource:r.C3,errorProps:{disabled:!0},children:(0,b.jsx)(p.Z,{tooltip:X?"":(0,r.MK)(r.XM,"create a Policy"),children:(0,b.jsx)(s.zxk,{id:"create-policy",label:"Create Policy",variant:"callAction",icon:(0,b.jsx)(s.dtP,{}),onClick:function(){n("".concat(r.gA.POLICY_ADD))},disabled:!X})})})]}),(0,b.jsx)(s.rjZ,{item:!0,xs:12,children:(0,b.jsx)(l.s,{scopes:[r.Ft.ADMIN_LIST_USER_POLICIES],resource:r.C3,errorProps:{disabled:!0},children:(0,b.jsx)(p.Z,{tooltip:Y?"":(0,r.MK)(r.GD,"view Policy details"),children:(0,b.jsx)(s.wQF,{itemActions:G,columns:[{label:"Name",elementKey:"name"}],isLoading:v,records:W,entityName:"Policies",idField:"name"})})})}),(0,b.jsx)(s.rjZ,{item:!0,xs:12,sx:{marginTop:15},children:(0,b.jsx)(s.KfX,{title:"Learn more about IAM POLICIES",iconComponent:(0,b.jsx)(s.v42,{}),help:(0,b.jsxs)(o.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,b.jsx)("br",{}),(0,b.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,b.jsx)("br",{}),(0,b.jsx)("br",{}),"You can learn more at our"," ",(0,b.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=4874.157a2b95.chunk.js.map