All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.CreateRealmRole-3423f0b0.js Maven / Gradle / Ivy

There is a newer version: 25.0.1
Show newest version
import{u as d,e as p,b as u,c as R,d as b,j as f,b1 as g,g as a,A as C,b4 as w}from"./index-831988f6.js";import{R as x}from"./RoleForm-a2b5b324.js";import"./FormAccess-589a8032.js";import"./copy-icon-476b0d6d.js";import"./Form-bd3cf98e.js";import"./GridItem-2c75fd83.js";import"./KeycloakTextArea-3e2614e3.js";import"./KeycloakTextInput-ead44014.js";import"./ViewHeader-2b1ad3ef.js";import"./Text-2a2c2dcc.js";import"./ToolbarContent-186be8fd.js";function M(){const{t:o}=d("roles"),s=p({mode:"onChange"}),n=u(),{realm:r}=R(),{addAlert:m,addError:i}=b(),l=async t=>{const c={...t,name:t.name?.trim(),attributes:{}};try{await a.roles.create(c);const e=await a.roles.findOneByName({name:t.name});if(!e)throw new Error(o("common:notFound"));m(o("roleCreated"),C.success),n(w({realm:r,id:e.id,tab:"details"}))}catch(e){i("roles:roleCreateError",e)}};return f.jsx(x,{form:s,onSubmit:l,cancelLink:g({realm:r}),role:"manage-realm",editMode:!1})}export{M as default};
//# sourceMappingURL=CreateRealmRole-3423f0b0.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy