github.com/minio/console@v1.4.1/web-app/build/static/js/9269.dfec9438.chunk.js (about)

     1  "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[9269],{79269:(e,s,t)=>{t.r(s),t.d(s,{default:()=>M});var a=t(65043),n=t(89923),r=t(22166),o=t(73216),c=t(77403),l=t(94141),i=t(64159),d=t(20554),u=t(56629),h=t(53518),x=t(70579);const p=e=>{let{open:s,closeModal:t}=e;const r=(0,d.jL)(),[o,p]=(0,a.useState)(""),[m,g]=(0,a.useState)(""),[j,w]=(0,a.useState)(""),[y,A]=(0,a.useState)(!1),b=localStorage.getItem("userLoggedIn")||"";return s?(0,x.jsxs)(l.A,{title:"Change Password for ".concat(b),modalOpen:s,onClose:()=>{g(""),w(""),p(""),t()},titleIcon:(0,x.jsx)(n.Fwq,{}),children:[(0,x.jsx)("div",{children:"This will change your Console password. Please note your new password down, as it will be required to log into Console after this session."}),(0,x.jsx)(n.Wei,{variant:"warning",title:"Warning",message:(0,x.jsxs)(a.Fragment,{children:["If you are looking to change MINIO_ROOT_USER credentials, ",(0,x.jsx)("br",{}),"Please refer to"," ",(0,x.jsx)("a",{target:"_blank",rel:"noopener",href:"https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html#id4?ref=con",children:"rotating"})," ","credentials."]}),sx:{margin:"15px 0"}}),(0,x.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{if(e.preventDefault(),m!==j)return void r((0,i.Dy)({errorMessage:"New passwords don't match",detailedError:""}));if(m.length<8)return void r((0,i.Dy)({errorMessage:"Passwords must be at least 8 characters long",detailedError:""}));if(y)return;A(!0);let s={current_secret_key:o,new_secret_key:m};u.F.account.accountChangePassword(s).then((()=>{A(!1),g(""),w(""),p(""),r((0,i.Hk)("Successfully updated the password.")),t()})).catch((async e=>{A(!1),g(""),w(""),p("");const s=await e.json();r((0,i.C9)((0,h.S)(s)))}))})(e)},children:(0,x.jsxs)(n.xA9,{container:!0,children:[(0,x.jsx)(n.xA9,{item:!0,xs:12,sx:{...c.Uz.modalFormScrollable},children:(0,x.jsxs)(n.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,x.jsx)(n.cl_,{id:"current-password",name:"current-password",onChange:e=>{p(e.target.value)},label:"Current Password",type:"password",value:o}),(0,x.jsx)(n.cl_,{id:"new-password",name:"new-password",onChange:e=>{g(e.target.value)},label:"New Password",type:"password",value:m}),(0,x.jsx)(n.cl_,{id:"re-new-password",name:"re-new-password",onChange:e=>{w(e.target.value)},label:"Type New Password Again",type:"password",value:j})]})}),(0,x.jsx)(n.xA9,{item:!0,xs:12,sx:{...c.Uz.modalButtonBar},children:(0,x.jsx)(n.$nd,{id:"save-password-modal",type:"submit",variant:"callAction",color:"primary",disabled:y||!(o.length>0&&m.length>0&&j.length>0),label:"Save"})}),y&&(0,x.jsx)(n.xA9,{item:!0,xs:12,children:(0,x.jsx)(n.z21,{})})]})})]}):null};var m=t(64681),g=t(72237),j=t(45479),w=t(68045),y=t(10158),A=t(46537),b=t(6681),f=t(48793),C=t(55968),v=t(99956),S=t(8185),k=t(77938),_=t(99161);const E=(0,g.A)(a.lazy((()=>t.e(8823).then(t.bind(t,18823))))),M=()=>{const e=(0,d.jL)(),s=(0,o.Zp)(),t=(0,r.d4)(A.s$),[l,g]=(0,a.useState)([]),[M,R]=(0,a.useState)(!1),[I,K]=(0,a.useState)(""),[O,P]=(0,a.useState)(!1),[D,N]=(0,a.useState)(null),[T,F]=(0,a.useState)(!1),[L,U]=(0,a.useState)([]),[z,V]=(0,a.useState)(!1),[$,W]=(0,a.useState)(!1),B=t&&t.includes("external-idp")||!1;(0,a.useEffect)((()=>{H()}),[]),(0,a.useEffect)((()=>{e((0,i.ph)("accessKeys"))}),[]),(0,a.useEffect)((()=>{M&&u.F.serviceAccounts.listUserServiceAccounts().then((e=>{R(!1);const s=e.data.sort(S.LA);g(s)})).catch((s=>{e((0,i.C9)((0,h.S)((null===s||void 0===s?void 0:s.error)||"Error retrieving access keys"))),R(!1)}))}),[M,R,g,e]);const H=()=>{R(!0)},J=e=>{N(e),W(!0)},q=[{type:"view",onClick:e=>{e&&J(e.accessKey)}},{type:"delete",onClick:e=>{e&&(e=>{N(e),P(!0)})(e.accessKey)}},{type:"edit",onClick:e=>{e&&J(e.accessKey)}}],Q=l.filter((e=>{var s;return null===e||void 0===e||null===(s=e.accessKey)||void 0===s?void 0:s.toLowerCase().includes(I.toLowerCase())}));return(0,x.jsxs)(a.Fragment,{children:[O&&(0,x.jsx)(E,{deleteOpen:O,selectedServiceAccount:D,closeDeleteModalAndRefresh:e=>{(e=>{P(!1),e&&(U([]),H())})(e)}}),z&&(0,x.jsx)(w.A,{deleteOpen:z,selectedSAs:L,closeDeleteModalAndRefresh:s=>{V(!1),s&&(e((0,i.Hk)("Access keys deleted successfully.")),U([]),R(!0))}}),$&&(0,x.jsx)(y.A,{open:$,selectedAccessKey:D,closeModalAndRefresh:()=>{W(!1),R(!0)}}),(0,x.jsx)(p,{open:T,closeModal:()=>F(!1)}),(0,x.jsx)(f.A,{label:"Access Keys",actions:(0,x.jsx)(C.A,{})}),(0,x.jsx)(n.Mxu,{children:(0,x.jsxs)(n.xA9,{container:!0,children:[(0,x.jsxs)(n.xA9,{item:!0,xs:12,sx:{...c._0.actionsTray},children:[(0,x.jsx)(m.A,{placeholder:"Search Access Keys",onChange:K,sx:{marginRight:"auto",maxWidth:380},value:I}),(0,x.jsxs)(n.azJ,{sx:{display:"flex",flexWrap:"nowrap",gap:5},children:[(0,x.jsx)(b.A,{tooltip:"Delete Selected",children:(0,x.jsx)(n.$nd,{id:"delete-selected-accounts",onClick:()=>{V(!0)},label:"Delete Selected",icon:(0,x.jsx)(n.d7y,{}),disabled:0===L.length,variant:"secondary"})}),(0,x.jsx)(k.R,{scopes:[_.OV.ADMIN_CREATE_USER],resource:_.Ms,matchAll:!0,errorProps:{disabled:!0},children:(0,x.jsx)(n.$nd,{id:"change-password",onClick:()=>F(!0),label:"Change Password",icon:(0,x.jsx)(n.aJN,{}),variant:"regular",disabled:B})}),(0,x.jsx)(k.R,{scopes:[_.OV.ADMIN_CREATE_SERVICEACCOUNT],resource:_.Ms,matchAll:!0,errorProps:{disabled:!0},children:(0,x.jsx)(n.$nd,{id:"create-service-account",onClick:()=>{s("".concat(_.zZ.ACCOUNT_ADD))},label:"Create access key",icon:(0,x.jsx)(n.REV,{}),variant:"callAction"})})]})]}),(0,x.jsx)(n.xA9,{item:!0,xs:12,children:(0,x.jsx)(n.bQt,{itemActions:q,entityName:"Access Keys",columns:v.X,onSelect:e=>(0,j.Qm)(e,U,L),selectedItems:L,isLoading:M,records:Q,idField:"accessKey"})}),(0,x.jsx)(n.xA9,{item:!0,xs:12,sx:{marginTop:15},children:(0,x.jsx)(n.lVp,{title:"Learn more about ACCESS KEYS",iconComponent:(0,x.jsx)(n.JMb,{}),help:(0,x.jsxs)(a.Fragment,{children:["MinIO access keys are child identities of an authenticated MinIO user, including externally managed identities. Each access key inherits its privileges based on the policies attached to it\u2019s parent user or those groups in which the parent user has membership. Access Keys also support an optional inline policy which further restricts access to a subset of actions and resources available to the parent user.",(0,x.jsx)("br",{}),(0,x.jsx)("br",{}),"You can learn more at our"," ",(0,x.jsx)("a",{href:"https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html?ref=con#id3",target:"_blank",rel:"noopener",children:"documentation"}),"."]})})})]})})]})}}}]);
     2  //# sourceMappingURL=9269.dfec9438.chunk.js.map