mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
5.3 KiB
JavaScript
2 lines
5.3 KiB
JavaScript
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[3171],{43171:(e,s,t)=>{t.r(s),t.d(s,{default:()=>f});var i=t(72791),o=t(57689),r=t(23814),n=t(29945),a=t(31776),l=t(82342),c=t(56087),d=t(87995),p=t(44690),x=t(80184);const u=e=>{let{icon:s,description:t}=e;return(0,x.jsxs)(n.xuv,{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})]})},g=()=>(0,x.jsxs)(n.xuv,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px",marginTop:0},children:[(0,x.jsxs)(n.xuv,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,x.jsx)(n.M9A,{}),(0,x.jsx)("div",{children:"Learn more about Groups"})]}),(0,x.jsxs)(n.xuv,{sx:{fontSize:"14px",marginBottom:"15px"},children:["Adding groups lets you assign IAM policies to multiple users at once.",(0,x.jsx)(n.xuv,{sx:{paddingTop:"20px",paddingBottom:"10px"},children:"Users inherit access permissions to data and resources through the groups they belong to."}),(0,x.jsx)(n.xuv,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"A user can be a member of multiple groups."}),(0,x.jsx)(n.xuv,{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.xuv,{sx:{display:"flex",flexFlow:"column"},children:[(0,x.jsx)(u,{icon:(0,x.jsx)(n.wws,{}),description:"Add Users to Group"}),(0,x.jsx)(n.xuv,{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.v42,{}),description:"Assign Custom IAM Policies for Group"}),(0,x.jsx)(n.xuv,{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(40228),m=t(79844),j=t(61342);const f=()=>{const e=(0,p.TL)(),s=(0,o.s0)(),[t,u]=(0,i.useState)(""),[f,y]=(0,i.useState)(!1),[v,b]=(0,i.useState)([]),[S,w]=(0,i.useState)(!1);(0,i.useEffect)((()=>{w(""!==t.trim())}),[t,v]),(0,i.useEffect)((()=>{if(f){(()=>{a.h.groups.addGroup({group:t,members:v}).then((e=>{y(!1),s("".concat(c.gA.GROUPS))})).catch((s=>{y(!1),e((0,d.Ih)((0,l.g)(s.error)))}))})()}}),[f,t,v,e,s]);return(0,i.useEffect)((()=>{e((0,d.Sc)("add_group"))}),[]),(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(m.Z,{label:(0,x.jsx)(n.hbI,{label:"Groups",onClick:()=>s(c.gA.GROUPS)}),actions:(0,x.jsx)(j.Z,{})}),(0,x.jsx)(n.Xgh,{children:(0,x.jsx)(n.ltY,{title:"Create Group",icon:(0,x.jsx)(n.yeO,{}),helpBox:(0,x.jsx)(g,{}),children:(0,x.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{e.preventDefault(),y(!0)},children:[(0,x.jsx)(n.Wzg,{id:"group-name",name:"group-name",label:"Group Name",autoFocus:!0,value:t,onChange:e=>{u(e.target.value)}}),(0,x.jsx)(h.Z,{selectedUsers:v,setSelectedUsers:b,editMode:!0}),(0,x.jsxs)(n.rjZ,{item:!0,xs:12,sx:r.ID.modalButtonBar,children:[(0,x.jsx)(n.zxk,{id:"clear-group",type:"button",variant:"regular",onClick:()=>{u(""),b([])},label:"Clear"}),(0,x.jsx)(n.zxk,{id:"save-group",type:"submit",variant:"callAction",disabled:f||!S,label:"Save"})]}),f&&(0,x.jsx)(n.rjZ,{item:!0,xs:12,children:(0,x.jsx)(n.kod,{})})]})})})]})}},40228:(e,s,t)=>{t.d(s,{Z:()=>g});var i=t(72791),o=t(26181),r=t.n(o),n=t(31776),a=t(82342),l=t(29945),c=t(21639),d=t(87995),p=t(44690),x=t(59114),u=t(80184);const g=e=>{let{selectedUsers:s,setSelectedUsers:t,editMode:o=!1}=e;const g=(0,p.TL)(),[h,m]=(0,i.useState)([]),[j,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(""),b=(0,i.useCallback)((()=>{n.h.users.listUsers().then((e=>{let s=r()(e.data,"users",[]);s||(s=[]),m(s.sort(c.LQ)),f(!1)})).catch((e=>{g((0,d.zb)((0,a.g)(e.error))),f(!1)}))}),[g]);(0,i.useEffect)((()=>{f(!0)}),[]),(0,i.useEffect)((()=>{j&&b()}),[j,b]);const S=s||[],w=h.filter((e=>e.accessKey.includes(y)));return(0,u.jsx)(l.rjZ,{item:!0,xs:12,className:"inputItem",children:(0,u.jsxs)(l.xuv,{children:[j&&(0,u.jsx)(l.kod,{}),(null===h||void 0===h?void 0:h.length)>0?(0,u.jsxs)(i.Fragment,{children:[(0,u.jsx)(l.rjZ,{item:!0,xs:12,className:"inputItem",children:(0,u.jsx)(x.Z,{label:o?"Edit Members":"Assign Users",placeholder:"Filter Users",onChange:v,value:y})}),(0,u.jsx)(l.wQF,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:e=>{const s=e.target,i=s.value,o=s.checked;let r=[...S];return o?r.push(i):r=r.filter((e=>e!==i)),t(r),r},selectedItems:S,isLoading:j,records:w,entityName:"Users",idField:"accessKey",customPaperHeight:"200px"})]}):(0,u.jsx)(l.xuv,{sx:{textAlign:"center",padding:"10px 0"},children:"No Users to display"})]})})}},21639:(e,s,t)=>{t.d(s,{KE:()=>n,LQ:()=>i,V2:()=>r,g4:()=>o});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},o=(e,s)=>e.name>s.name?1:e.name<s.name?-1:0,r=(e,s)=>e>s?1:e<s?-1:0,n=(e,s)=>e.policy>s.policy?1:e.policy<s.policy?-1:0}}]);
|
|
//# sourceMappingURL=3171.3fa9dcf2.chunk.js.map
|