github.com/minio/console@v1.4.1/web-app/build/static/js/144.c7530a4b.chunk.js (about) 1 "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[144],{40144:(e,s,t)=>{t.r(s),t.d(s,{default:()=>j});var i=t(65043),a=t(73216),o=t(77403),n=t(89923),r=t(56629),l=t(53518),c=t(99161),d=t(64159),p=t(20554),x=t(70579);const u=e=>{let{icon:s,description:t}=e;return(0,x.jsxs)(n.azJ,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[s," ",(0,x.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:t})]})},m=()=>(0,x.jsxs)(n.azJ,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px",marginTop:0},children:[(0,x.jsxs)(n.azJ,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,x.jsx)(n.nag,{}),(0,x.jsx)("div",{children:"Learn more about Groups"})]}),(0,x.jsxs)(n.azJ,{sx:{fontSize:"14px",marginBottom:"15px"},children:["Adding groups lets you assign IAM policies to multiple users at once.",(0,x.jsx)(n.azJ,{sx:{paddingTop:"20px",paddingBottom:"10px"},children:"Users inherit access permissions to data and resources through the groups they belong to."}),(0,x.jsx)(n.azJ,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"A user can be a member of multiple groups."}),(0,x.jsx)(n.azJ,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"Groups provide a simplified method for managing shared permissions among users with common access patterns and workloads. Client\u2019s cannot authenticate to a MinIO deployment using a group as an identity."})]}),(0,x.jsxs)(n.azJ,{sx:{display:"flex",flexFlow:"column"},children:[(0,x.jsx)(u,{icon:(0,x.jsx)(n.YXz,{}),description:"Add Users to Group"}),(0,x.jsx)(n.azJ,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"Select from the list of displayed users to assign users to the new group at creation. These users inherit the policies assigned to the group."}),(0,x.jsx)(u,{icon:(0,x.jsx)(n.n$X,{}),description:"Assign Custom IAM Policies for Group"}),(0,x.jsx)(n.azJ,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"You can add policies to the group by selecting it from the Groups view after creation. The Policy view lets you manage the assigned policies for the group."})]})]});var h=t(22923),g=t(48793),f=t(55968);const j=()=>{const e=(0,p.jL)(),s=(0,a.Zp)(),[t,u]=(0,i.useState)(""),[j,y]=(0,i.useState)(!1),[b,S]=(0,i.useState)([]),[z,A]=(0,i.useState)(!1);(0,i.useEffect)((()=>{A(""!==t.trim())}),[t,b]),(0,i.useEffect)((()=>{if(j){(()=>{r.F.groups.addGroup({group:t,members:b}).then((e=>{y(!1),s("".concat(c.zZ.GROUPS))})).catch((s=>{y(!1),e((0,d.C9)((0,l.S)(s.error)))}))})()}}),[j,t,b,e,s]);return(0,i.useEffect)((()=>{e((0,d.ph)("add_group"))}),[]),(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(g.A,{label:(0,x.jsx)(n.EGL,{label:"Groups",onClick:()=>s(c.zZ.GROUPS)}),actions:(0,x.jsx)(f.A,{})}),(0,x.jsx)(n.Mxu,{children:(0,x.jsx)(n.Hbc,{title:"Create Group",icon:(0,x.jsx)(n.lwR,{}),helpBox:(0,x.jsx)(m,{}),children:(0,x.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{e.preventDefault(),y(!0)},children:[(0,x.jsx)(n.cl_,{id:"group-name",name:"group-name",label:"Group Name",autoFocus:!0,value:t,onChange:e=>{u(e.target.value)}}),(0,x.jsx)(h.A,{selectedUsers:b,setSelectedUsers:S,editMode:!0}),(0,x.jsxs)(n.xA9,{item:!0,xs:12,sx:o.Uz.modalButtonBar,children:[(0,x.jsx)(n.$nd,{id:"clear-group",type:"button",variant:"regular",onClick:()=>{u(""),S([])},label:"Clear"}),(0,x.jsx)(n.$nd,{id:"save-group",type:"submit",variant:"callAction",disabled:j||!z,label:"Save"})]}),j&&(0,x.jsx)(n.xA9,{item:!0,xs:12,children:(0,x.jsx)(n.z21,{})})]})})})]})}},22923:(e,s,t)=>{t.d(s,{A:()=>m});var i=t(65043),a=t(33097),o=t.n(a),n=t(56629),r=t(53518),l=t(89923),c=t(8185),d=t(64159),p=t(20554),x=t(64681),u=t(70579);const m=e=>{let{selectedUsers:s,setSelectedUsers:t,editMode:a=!1}=e;const m=(0,p.jL)(),[h,g]=(0,i.useState)([]),[f,j]=(0,i.useState)(!1),[y,b]=(0,i.useState)(""),S=(0,i.useCallback)((()=>{n.F.users.listUsers().then((e=>{let s=o()(e.data,"users",[]);s||(s=[]),g(s.sort(c.LA)),j(!1)})).catch((e=>{m((0,d.Dy)((0,r.S)(e.error))),j(!1)}))}),[m]);(0,i.useEffect)((()=>{j(!0)}),[]),(0,i.useEffect)((()=>{f&&S()}),[f,S]);const z=s||[],A=h.filter((e=>e.accessKey.includes(y)));return(0,u.jsx)(l.xA9,{item:!0,xs:12,className:"inputItem",children:(0,u.jsxs)(l.azJ,{children:[f&&(0,u.jsx)(l.z21,{}),(null===h||void 0===h?void 0:h.length)>0?(0,u.jsxs)(i.Fragment,{children:[(0,u.jsx)(l.xA9,{item:!0,xs:12,className:"inputItem",children:(0,u.jsx)(x.A,{label:a?"Edit Members":"Assign Users",placeholder:"Filter Users",onChange:b,value:y})}),(0,u.jsx)(l.bQt,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:e=>{const s=e.target,i=s.value,a=s.checked;let o=[...z];return a?o.push(i):o=o.filter((e=>e!==i)),t(o),o},selectedItems:z,isLoading:f,records:A,entityName:"Users",idField:"accessKey",customPaperHeight:"200px"})]}):(0,u.jsx)(l.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Users to display"})]})})}},8185:(e,s,t)=>{t.d(s,{Hw:()=>a,LA:()=>i,SO:()=>o,rY:()=>n});const i=(e,s)=>{if(e.accessKey&&s.accessKey){if(e.accessKey>s.accessKey)return 1;if(e.accessKey<s.accessKey)return-1}return 0},a=(e,s)=>e.name>s.name?1:e.name<s.name?-1:0,o=(e,s)=>e>s?1:e<s?-1:0,n=(e,s)=>e.policy>s.policy?1:e.policy<s.policy?-1:0}}]); 2 //# sourceMappingURL=144.c7530a4b.chunk.js.map