Files
openmaxio-object-browser/web-app/build/static/js/4619.0e7615ad.chunk.js
2023-12-29 11:44:01 -06:00

2 lines
1.9 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[4619],{94619:(e,t,a)=>{a.r(t),a.d(t,{default:()=>p});var l=a(72791),s=a(56028),r=a(29945),i=a(31776),n=a(82342),o=a(23814),c=a(87995),d=a(44690),u=a(80184);const p=e=>{let{modalOpen:t,onClose:a,bucket:p,prefilledRoute:h}=e;const x=(0,d.TL)(),[f,b]=(0,l.useState)(""),[k,y]=(0,l.useState)("readonly");(0,l.useEffect)((()=>{h&&b(h)}),[h]);return(0,u.jsx)(s.Z,{modalOpen:t,title:"Add Anonymous Access Rule",onClose:a,titleIcon:(0,u.jsx)(r.sR0,{}),children:(0,u.jsxs)(r.ltY,{withBorders:!1,containerPadding:!1,children:[(0,u.jsx)(r.Wzg,{value:f,label:"Prefix",id:"prefix",name:"prefix",placeholder:"Enter Prefix",onChange:e=>{b(e.target.value)},tooltip:"Enter '/' to apply the rule to all prefixes and objects at the bucket root. Do not include the wildcard asterisk '*' as part of the prefix *unless* it is an explicit part of the prefix name. The Console automatically appends an asterisk to the appropriate sections of the resulting IAM policy."}),(0,u.jsx)(r.PhF,{id:"access",name:"Access",onChange:e=>{y(e)},label:"Access",value:k,options:[{label:"readonly",value:"readonly"},{label:"writeonly",value:"writeonly"},{label:"readwrite",value:"readwrite"}],disabled:!1,helpTip:(0,u.jsx)(l.Fragment,{children:"Select the desired level of access available to unauthenticated Users"}),helpTipPlacement:"right"}),(0,u.jsxs)(r.rjZ,{item:!0,xs:12,sx:o.ID.modalButtonBar,children:[(0,u.jsx)(r.zxk,{id:"clear",type:"button",variant:"regular",onClick:()=>{b(""),y("readonly")},label:"Clear"}),(0,u.jsx)(r.zxk,{id:"add-access-save",type:"submit",variant:"callAction",disabled:""===f.trim(),onClick:()=>{i.h.bucket.setAccessRuleWithBucket(p,{prefix:f,access:k}).then((e=>{x((0,c.y1)("Access Rule added successfully")),a()})).catch((e=>{x((0,c.Ih)((0,n.g)(e.error))),a()}))},label:"Save"})]})]})})}}}]);
//# sourceMappingURL=4619.0e7615ad.chunk.js.map