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

web-interface.assets.6e61897c-14.472622149827c1587209.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
{"version":3,"sources":["webpack:///./src/components/users/UserCreate/TimezoneFormGroup.tsx","webpack:///./src/components/users/UserCreate/PasswordFormGroup.tsx","webpack:///./src/components/users/UserCreate/EmailFormGroup.tsx","webpack:///./src/components/common/Section/SectionComponent.tsx","webpack:///./src/components/permissions/RolesSelector.tsx","webpack:///./src/components/users/timeoutConstants.js","webpack:///./src/components/users/TimeoutUnitSelect.tsx","webpack:///./src/components/users/TimeoutInput.tsx","webpack:///./src/components/users/UserCreate/TimeoutFormGroup.tsx","webpack:///./src/components/users/navigation/UserOverviewLinks.tsx","webpack:///./src/logic/roles/Role.ts","webpack:///./src/actions/roles/AuthzRolesActions.ts","webpack:///./src/stores/roles/AuthzRolesStore.ts","webpack:///./src/components/users/UserCreate/LastNameFormGroup.tsx","webpack:///./src/components/users/UserCreate/FirstNameFormGroup.tsx","webpack:///./src/components/users/UserCreate/ServiceAccountFormGroup.tsx","webpack:///./src/domainActions/roles/AuthzRolesDomain.tsx"],"names":["TimezoneFormGroup","name","field","value","onChange","id","label","help","labelClassName","wrapperClassName","className","newValue","target","validatePasswords","errors","password","passwordRepeat","newErrors","length","password_repeat","PasswordFormGroup","sm","maxLength","type","placeholder","required","formGroupClassName","minLength","defaultProps","passwordRef","undefined","passwordRepeatRef","EmailFormGroup","Header","styled","div","Headline","h2","LoadingSpinner","Spinner","theme","css","fonts","size","h3","SectionComponent","children","title","showLoading","headerActions","xs","text","delay","SubmitButton","Button","FormElements","RoleSelectOption","StyledSelect","Select","_renderRoleOption","RolesSelector","assignedRolesIds","onSubmit","identifier","useState","paginatedRoles","setPaginatedRoles","selectedRoleName","setSelectedRoleName","isSubmitting","setIsSubmitting","error","setError","useEffect","AuthzRolesDomain","loadRolesPaginated","page","perPage","query","then","_loadRoles","options","roles","filter","role","includes","toArray","map","r","_options","list","inputProps","optionRenderer","multi","bsStyle","onClick","selectedRoleNames","split","selectedRoles","Immutable","compact","selection","find","_assignRole","disabled","runtimeError","onClose","propTypes","PropTypes","func","isRequired","MS_DAY","MS_HOUR","MS_MINUTE","MS_SECOND","TimeoutSelect","OPTIONS","TimeoutUnitSelect","props","TimeoutInput","propsValue","sessionTimeoutNever","setSessionTimeoutNever","_estimateUnit","unit","setUnit","Math","floor","Number","setValue","evt","checked","min","data-validate","newUnit","number","TimeoutFormGroup","UserOverviewLinks","teamsRoute","Routes","getPluginRoute","permissions","to","SYSTEM","USERS","OVERVIEW","Role","description","readOnly","this","_value","Builder","read_only","create","set","toObject","AuthzRolesActions","singletonActions","Reflux","createActions","load","asyncResult","delete","addMembers","removeMember","loadUsersForRole","loadRolesForUser","_responseToPaginatedList","count","total","per_page","context","users","fromJSON","pagination","_responseToPaginatedUserList","u","UserOverview","encodeApiUrl","apiRoute","uriParams","encodedUriParams","param","encodeURIComponent","url","singletonStore","createStore","listenables","roleId","qualifyUrl","ApiRoutes","AuthzRolesController","promise","fetch","usernames","username","roleName","apiUrl","PaginationURL","LastNameFormGroup","FirstNameFormGroup","ServiceAccountFormGroup","confirmationModalRef","useRef","onValueChange","getValueFromInput","current","open","ref","onConfirm","close","onCancel","notifyingAction","action","message","notFoundRedirect","deleteAction","success","join"],"mappings":"6GAAA,oEAuCeA,IAjBW,kBACxB,gBAAC,YAAD,CAAWC,KAAK,aACb,oBAAGC,MAASD,EAAZ,EAAYA,KAAME,EAAlB,EAAkBA,MAAOC,EAAzB,EAAyBA,SAAzB,OACC,gBAAC,IAAD,CAAOC,GAAG,kBACHC,MAAM,YACNC,KAAK,gFACLC,eAAe,WACfC,iBAAiB,YACtB,gBAAC,KAAD,CAAgBC,UAAU,kBACVP,MAAOA,EACPF,KAAK,WACLG,SAAU,SAACO,GAAD,OAAcP,EAAS,CAAEQ,OAAQ,CAAEX,OAAME,MAAOQ,c,oeCX3E,IAEME,EAAoB,SAACC,EAAoCC,EAAkBC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,YAAgB,CACvCC,OAAQzD,IAAkBS,iBAC1B9F,MAAO,SAACA,EAAO4H,EAAUC,GAAlB,MAAgC,CACrCkB,QAAS,2BAAF,OAA6BlB,EAA7B,iCAA8D7H,OAInE+F,EAAmB8C,YAAgB,CACvCC,OAAQzD,IAAkBU,iBAC1B/F,MAAO,SAACA,EAAO4H,GAAR,MAAsB,CAC3BmB,QAAS,2BAAF,OAA6BnB,EAA7B,iCAA8D5H,OAInEI,EAAqByI,YAAgB,CACzCC,OAAQzD,IAAkBjF,mBAC1BJ,MAAO,SAACA,GAAD,MAAY,CACjB+I,QAAS,qCAAF,OAAuC/I,OAInC,KACbyF,OACAE,OAAQsD,EACRrD,aACAC,eACAC,mBACAC,mBACA3F","file":"6e61897c-14.472622149827c1587209.js","sourcesContent":["/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { FastField } from 'formik';\n\nimport { Input } from 'components/bootstrap';\nimport { TimezoneSelect } from 'components/common';\n\nconst TimezoneFormGroup = () => (\n  \n    {({ field: { name, value, onChange } }) => (\n      \n         onChange({ target: { name, value: newValue } })} />\n      \n    )}\n  \n);\n\nexport default TimezoneFormGroup;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { Row, Col } from 'components/graylog';\nimport { FormikInput } from 'components/common';\nimport { Input } from 'components/bootstrap';\n\nexport const PASSWORD_MIN_LENGTH = 6;\n\nexport const validatePasswords = (errors: { [name: string]: string }, password: string, passwordRepeat: string) => {\n  const newErrors = { ...errors };\n\n  if (password && password.length < PASSWORD_MIN_LENGTH) {\n    newErrors.password = `Password must be at least ${PASSWORD_MIN_LENGTH} characters long`;\n  }\n\n  if (password && passwordRepeat) {\n    const passwordMatches = password === passwordRepeat;\n\n    if (!passwordMatches) {\n      newErrors.password_repeat = 'Passwords do not match';\n    }\n  }\n\n  return newErrors;\n};\n\ntype Props = {};\n\n// eslint-disable-next-line no-empty-pattern\nconst PasswordFormGroup = ({}: Props) => (\n  \n    \n      \n        \n      \n      \n        \n      \n    \n  \n);\n\nPasswordFormGroup.defaultProps = {\n  passwordRef: undefined,\n  passwordRepeatRef: undefined,\n};\n\nexport default PasswordFormGroup;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { FormikFormGroup } from 'components/common';\n\nconst EmailFormGroup = () => (\n  \n);\n\nexport default EmailFormGroup;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Spinner from 'components/common/Spinner';\nimport { Row, Col } from 'components/graylog';\n\ntype Props = {\n  children: React.ReactNode,\n  title: string,\n  showLoading?: boolean,\n  headerActions?: React.ReactElement,\n  className?: string,\n};\n\nconst Header = styled.div`\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n\n  *:not(:first-child) {\n    margin-left: 10px;\n  }\n`;\n\nexport const Headline = styled.h2`\n  margin-bottom: 15px;\n  display: inline;\n`;\n\nconst LoadingSpinner = styled(Spinner)(({ theme }) => css`\n  margin-left: 10px;\n  font-size: ${theme.fonts.size.h3};\n`);\n\nconst SectionComponent = ({ children, title, showLoading = false, headerActions, className }: Props) => (\n  \n    \n      
\n \n {title}\n {showLoading && }\n \n {headerActions}\n
\n {children}\n \n
\n);\n\nSectionComponent.defaultProps = {\n className: '',\n showLoading: false,\n headerActions: undefined,\n};\n\nexport default SectionComponent;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport * as Immutable from 'immutable';\nimport { compact } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { useEffect, useState } from 'react';\nimport styled from 'styled-components';\n\nimport type { PaginatedRoles } from 'actions/roles/AuthzRolesActions';\nimport AuthzRolesDomain from 'domainActions/roles/AuthzRolesDomain';\nimport Role from 'logic/roles/Role';\nimport { Button } from 'components/graylog';\nimport { Select, Spinner, ErrorAlert } from 'components/common';\n\ntype Props = {\n assignedRolesIds: Immutable.Set,\n identifier: (role: Role) => string,\n onSubmit: (role: Immutable.Set) => Promise,\n};\n\nconst SubmitButton = styled(Button)`\n margin-left: 15px;\n`;\n\nconst FormElements = styled.div`\n display: flex;\n`;\n\nconst RoleSelectOption = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst StyledSelect = styled(Select)`\n flex: 1;\n`;\n\nconst _renderRoleOption = ({ label }: { label: string }) => (\n {label}\n);\n\nconst _options = (roles, assignedRolesIds, identifier) => roles\n .filter((role) => !assignedRolesIds.includes(identifier(role)))\n .toArray()\n .map((r) => ({ label: r.name, value: r.name, role: r }));\n\nconst _assignRole = (selectedRoleName, roles, onSubmit, setSelectedRoleName, setIsSubmitting, setError) => {\n if (!selectedRoleName) {\n return;\n }\n\n const selectedRoleNames = selectedRoleName.split(',');\n\n const selectedRoles = Immutable.Set(compact(selectedRoleNames.map((selection) => {\n return roles.find((r) => r.name === selection);\n })));\n\n if (selectedRoles.size <= 0) {\n setError(`Role assignment failed, because the roles ${selectedRoleName ?? '(undefined)'} does not exist`);\n\n return;\n }\n\n setError();\n setIsSubmitting(true);\n\n onSubmit(selectedRoles).then(() => {\n setSelectedRoleName();\n setIsSubmitting(false);\n });\n};\n\nconst _loadRoles = (setPaginatedRoles) => {\n const getUnlimited = { page: 1, perPage: 0, query: '' };\n\n AuthzRolesDomain.loadRolesPaginated(getUnlimited).then(setPaginatedRoles);\n};\n\nconst RolesSelector = ({ assignedRolesIds, onSubmit, identifier }: Props) => {\n const [paginatedRoles, setPaginatedRoles] = useState();\n const [selectedRoleName, setSelectedRoleName] = useState();\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [error, setError] = useState();\n\n useEffect(() => _loadRoles(setPaginatedRoles), []);\n\n if (!paginatedRoles) {\n return ;\n }\n\n const _onSubmit = () => _assignRole(selectedRoleName, paginatedRoles.list, onSubmit, setSelectedRoleName, setIsSubmitting, setError);\n const options = _options(paginatedRoles.list, assignedRolesIds, identifier);\n\n return (\n
\n \n \n \n Assign Role\n \n \n \n {error}\n \n
\n );\n};\n\nRolesSelector.defaultProps = {\n identifier: (role) => role.id,\n};\n\nRolesSelector.propTypes = {\n identifier: PropTypes.func,\n onSubmit: PropTypes.func.isRequired,\n};\n\nexport default RolesSelector;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nexport const MS_DAY = 24 * 60 * 60 * 1000;\nexport const MS_HOUR = 60 * 60 * 1000;\nexport const MS_MINUTE = 60 * 1000;\nexport const MS_SECOND = 1000;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport React from 'react';\nimport styled from 'styled-components';\n\nimport { Select } from 'components/common';\n\nimport { MS_DAY, MS_HOUR, MS_MINUTE, MS_SECOND } from './timeoutConstants';\n\nconst TimeoutSelect = styled(Select)`\n width: 150px;\n`;\n\nconst OPTIONS = [\n { value: `${MS_SECOND}`, label: 'Seconds' },\n { value: `${MS_MINUTE}`, label: 'Minutes' },\n { value: `${MS_HOUR}`, label: 'Hours' },\n { value: `${MS_DAY}`, label: 'Days' },\n];\n\nconst TimeoutUnitSelect = (props) => (\n \n);\n\nexport default TimeoutUnitSelect;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Row, Col, HelpBlock } from 'components/graylog';\nimport { Input } from 'components/bootstrap';\nimport TimeoutUnitSelect from 'components/users/TimeoutUnitSelect';\n\nimport { MS_DAY, MS_HOUR, MS_MINUTE, MS_SECOND } from './timeoutConstants';\n\ntype Props = {\n value: number,\n onChange: (value: number) => void;\n};\n\nconst _estimateUnit = (value) => {\n if (value === 0) {\n return MS_SECOND;\n }\n\n if (value % MS_DAY === 0) {\n return MS_DAY;\n }\n\n if (value % MS_HOUR === 0) {\n return MS_HOUR;\n }\n\n if (value % MS_MINUTE === 0) {\n return MS_MINUTE;\n }\n\n return MS_SECOND;\n};\n\nconst TimeoutInput = ({ value: propsValue, onChange }: Props) => {\n const [sessionTimeoutNever, setSessionTimeoutNever] = useState(propsValue === -1);\n const [unit, setUnit] = useState(_estimateUnit(propsValue));\n const [value, setValue] = useState(propsValue ? Math.floor(propsValue / Number(unit)) : 0);\n\n const getValue = () => {\n if (sessionTimeoutNever) {\n return -1;\n }\n\n return (value * Number(unit));\n };\n\n useEffect(() => {\n if (typeof onChange === 'function') {\n onChange(getValue());\n }\n }, [value, unit, sessionTimeoutNever]);\n\n const _onClick = (evt) => {\n setSessionTimeoutNever(evt.target.checked);\n };\n\n const _onChangeValue = (evt) => {\n setValue(evt.target.value);\n };\n\n const _onChangeUnit = (newUnit: string) => {\n setUnit(newUnit);\n };\n\n return (\n <>\n \n <>\n \n\n
\n \n \n \n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore TODO: No overload matches this call */}\n \n \n \n \n \n Session automatically end after this amount of time, unless they are actively used.\n \n \n \n
\n \n \n \n );\n};\n\nTimeoutInput.propTypes = {\n value: PropTypes.number,\n onChange: PropTypes.func,\n};\n\nTimeoutInput.defaultProps = {\n value: MS_HOUR,\n onChange: () => {},\n};\n\nexport default TimeoutInput;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { Field } from 'formik';\n\nimport TimeoutInput from 'components/users/TimeoutInput';\n\nconst TimeoutFormGroup = () => (\n \n {({ field: { name, value, onChange } }) => (\n onChange({ target: { name, value: newValue } })} />\n )}\n \n);\n\nexport default TimeoutFormGroup;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { LinkContainer } from 'components/graylog/router';\nimport { IfPermitted } from 'components/common';\nimport Routes from 'routing/Routes';\nimport { ButtonToolbar, Button } from 'components/graylog';\n\nconst UserOverviewLinks = () => {\n const teamsRoute = Routes.getPluginRoute('SYSTEM_TEAMS');\n\n return (\n \n \n \n \n \n \n {teamsRoute && (\n \n \n \n \n \n )}\n \n );\n};\n\nexport default UserOverviewLinks;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as Immutable from 'immutable';\nimport { $PropertyType } from 'utility-types';\n\ntype InternalState = {\n id: string,\n name: string,\n description: string,\n permissions: Immutable.Set,\n readOnly: boolean,\n};\n\nexport type RoleJSON = {\n id: string,\n name: string,\n description: string,\n permissions: Immutable.Set,\n read_only: boolean,\n};\n\nexport default class Role {\n _value: InternalState;\n\n constructor(\n id: $PropertyType,\n name: $PropertyType,\n description: $PropertyType,\n permissions: $PropertyType,\n readOnly: $PropertyType,\n ) {\n this._value = {\n id,\n name,\n description,\n permissions,\n readOnly,\n };\n }\n\n get id() {\n return this._value.id;\n }\n\n get name() {\n return this._value.name;\n }\n\n get description() {\n return this._value.description;\n }\n\n get permissions() {\n return this._value.permissions;\n }\n\n get readOnly() {\n return this._value.readOnly;\n }\n\n toBuilder() {\n const {\n id,\n name,\n description,\n permissions,\n readOnly,\n } = this._value;\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return new Builder(Immutable.Map({\n id,\n name,\n description,\n permissions,\n readOnly,\n }));\n }\n\n static create(\n id: $PropertyType,\n name: $PropertyType,\n description: $PropertyType,\n permissions: $PropertyType,\n readOnly: $PropertyType,\n ) {\n return new Role(\n id,\n name,\n description,\n permissions,\n readOnly,\n );\n }\n\n toJSON() {\n const {\n id,\n name,\n description,\n permissions,\n readOnly,\n } = this._value;\n\n return {\n id,\n name,\n description,\n permissions,\n read_only: readOnly,\n };\n }\n\n static fromJSON(value: RoleJSON) {\n const {\n id,\n name,\n description,\n permissions,\n read_only: readOnly,\n } = value;\n\n return Role.create(\n id,\n name,\n description,\n permissions,\n readOnly,\n );\n }\n\n static builder(): Builder {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return new Builder();\n }\n}\n\ntype BuilderState = Immutable.Map;\n\nclass Builder {\n value: BuilderState;\n\n constructor(value: BuilderState = Immutable.Map()) {\n this.value = value;\n }\n\n id(value: $PropertyType) {\n return new Builder(this.value.set('id', value));\n }\n\n name(value: $PropertyType) {\n return new Builder(this.value.set('name', value));\n }\n\n description(value: $PropertyType) {\n return new Builder(this.value.set('description', value));\n }\n\n permissions(value: $PropertyType) {\n return new Builder(this.value.set('permissions', value));\n }\n\n readOnly(value: $PropertyType) {\n return new Builder(this.value.set('readOnly', value));\n }\n\n build() {\n const {\n id,\n name,\n description,\n permissions,\n readOnly,\n } = this.value.toObject();\n\n return new Role(\n id,\n name,\n description,\n permissions,\n readOnly,\n );\n }\n}\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport Reflux from 'reflux';\nimport * as Immutable from 'immutable';\n\nimport Role from 'logic/roles/Role';\nimport UserOverview from 'logic/users/UserOverview';\nimport { singletonActions } from 'views/logic/singleton';\nimport type { PaginatedList, Pagination } from 'stores/PaginationTypes';\n\nexport type UserContext = {\n id: string,\n username: string,\n};\n\nexport type RoleContext = {\n users: { [key: string]: UserContext[] },\n};\n\nexport type PaginatedRoles = PaginatedList & {\n context: RoleContext,\n};\nexport type PaginatedUsers = PaginatedList;\n\nexport type ActionsType = {\n load: (roleId: string) => Promise,\n delete: (roleId: string, roleName: string) => Promise,\n addMembers: (roleId: string, usernames: Immutable.Set) => Promise,\n removeMember: (roleId: string, username: string) => Promise,\n loadUsersForRole: (roleId: string, roleName: string, pagination: Pagination) => Promise,\n loadRolesForUser: (username: string, pagination: Pagination) => Promise,\n loadRolesPaginated: (pagination: Pagination) => Promise,\n};\n\nconst AuthzRolesActions = singletonActions(\n 'AuthzRoles',\n () => Reflux.createActions({\n load: { asyncResult: true },\n delete: { asyncResult: true },\n addMembers: { asyncResult: true },\n removeMember: { asyncResult: true },\n loadUsersForRole: { asyncResult: true },\n loadRolesForUser: { asyncResult: true },\n loadRolesPaginated: { asyncResult: true },\n }),\n);\n\nexport default AuthzRolesActions;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport Reflux from 'reflux';\nimport * as Immutable from 'immutable';\nimport { $PropertyType } from 'utility-types';\n\nimport type { PaginatedUsersResponse } from 'stores/users/UsersStore';\nimport type { Store } from 'stores/StoreTypes';\nimport fetch from 'logic/rest/FetchProvider';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport { qualifyUrl } from 'util/URLUtils';\nimport { singletonStore } from 'views/logic/singleton';\nimport PaginationURL from 'util/PaginationURL';\nimport Role from 'logic/roles/Role';\nimport type { RoleJSON } from 'logic/roles/Role';\nimport AuthzRolesActions, { PaginatedRoles, PaginatedUsers, RoleContext } from 'actions/roles/AuthzRolesActions';\nimport UserOverview from 'logic/users/UserOverview';\nimport type { PaginatedListJSON, Pagination } from 'stores/PaginationTypes';\n\nexport type PaginatedRolesResponse = PaginatedListJSON & {\n roles: Array,\n context?: RoleContext,\n};\n\nconst _responseToPaginatedList = ({ count, total, page, per_page, query, roles = [], context = { users: undefined } }: PaginatedRolesResponse) => ({\n list: Immutable.List(roles.map((r) => Role.fromJSON(r))),\n pagination: {\n query,\n page,\n perPage: per_page,\n count,\n total,\n },\n context,\n});\n\nconst _responseToPaginatedUserList = ({ count, total, page, per_page, query, users }: PaginatedUsersResponse) => ({\n list: Immutable.List(users.map((u) => UserOverview.fromJSON(u))),\n pagination: {\n page,\n perPage: per_page,\n query,\n count,\n total,\n },\n});\n\nconst encodeApiUrl = (apiRoute: (...args: Array) => { url: string }, uriParams: Array = []): string => {\n const encodedUriParams = uriParams.map((param) => encodeURIComponent(param));\n\n return apiRoute(...encodedUriParams).url;\n};\n\nconst AuthzRolesStore: Store<{}> = singletonStore(\n 'AuthzRoles',\n () => Reflux.createStore({\n listenables: [AuthzRolesActions],\n\n load(roleId: $PropertyType): Promise {\n const url = qualifyUrl(encodeApiUrl(ApiRoutes.AuthzRolesController.load, [roleId]));\n const promise = fetch('GET', url).then(Role.fromJSON);\n\n AuthzRolesActions.load.promise(promise);\n\n return promise;\n },\n\n delete(roleId: string): Promise {\n const url = qualifyUrl(encodeApiUrl(ApiRoutes.AuthzRolesController.delete, [roleId]));\n const promise = fetch('DELETE', url);\n\n AuthzRolesActions.delete.promise(promise);\n\n return promise;\n },\n\n addMembers(roleId: string, usernames: Immutable.Set): Promise {\n const url = encodeApiUrl(ApiRoutes.AuthzRolesController.addMembers, [roleId]);\n const promise = fetch('PUT', qualifyUrl(url), usernames.toArray());\n\n AuthzRolesActions.addMembers.promise(promise);\n\n return promise;\n },\n\n removeMember(roleId: string, username: string): Promise {\n const url = encodeApiUrl(ApiRoutes.AuthzRolesController.removeMember, [roleId, username]);\n const promise = fetch('DELETE', qualifyUrl(url));\n\n AuthzRolesActions.removeMember.promise(promise);\n\n return promise;\n },\n\n loadUsersForRole(roleId: string, roleName: string, { page, perPage, query }: Pagination): Promise {\n const apiUrl = encodeApiUrl(ApiRoutes.AuthzRolesController.loadUsersForRole, [roleId]);\n const url = PaginationURL(apiUrl, page, perPage, query);\n\n const promise = fetch('GET', qualifyUrl(url))\n .then(_responseToPaginatedUserList);\n\n AuthzRolesActions.loadUsersForRole.promise(promise);\n\n return promise;\n },\n\n loadRolesForUser(username: string, { page, perPage, query }: Pagination): Promise {\n const apiUrl = encodeApiUrl(ApiRoutes.AuthzRolesController.loadRolesForUser, [username]);\n const url = PaginationURL(apiUrl, page, perPage, query);\n\n const promise = fetch('GET', qualifyUrl(url))\n .then(_responseToPaginatedList);\n\n AuthzRolesActions.loadRolesForUser.promise(promise);\n\n return promise;\n },\n\n loadRolesPaginated({ page, perPage, query }: Pagination): Promise {\n const apiUrl = encodeApiUrl(ApiRoutes.AuthzRolesController.list);\n const url = PaginationURL(apiUrl, page, perPage, query);\n\n const promise = fetch('GET', qualifyUrl(url))\n .then(_responseToPaginatedList);\n\n AuthzRolesActions.loadRolesPaginated.promise(promise);\n\n return promise;\n },\n }),\n);\n\nexport { AuthzRolesActions, AuthzRolesStore };\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { FormikFormGroup } from 'components/common';\n\nconst LastNameFormGroup = () => (\n \n);\n\nexport default LastNameFormGroup;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { FormikFormGroup } from 'components/common';\n\nconst FirstNameFormGroup = () => (\n \n);\n\nexport default FirstNameFormGroup;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useRef } from 'react';\nimport { Field } from 'formik';\n\nimport { Input, BootstrapModalConfirm } from 'components/bootstrap';\nimport { getValueFromInput } from 'util/FormsUtils';\n\nconst ServiceAccountFormGroup = () => {\n const confirmationModalRef = useRef();\n\n return (\n \n {({ field: { name, value, onChange } }) => {\n const onValueChange = (newValue) => {\n const serviceAccountNewValue = getValueFromInput(newValue.target);\n\n if (serviceAccountNewValue) {\n confirmationModalRef.current.open();\n } else {\n onChange(newValue);\n }\n };\n\n const handleCheckServiceAccount = () => {\n onChange({ target: { name, value: true } });\n confirmationModalRef.current.close();\n };\n\n const handleCancel = () => {\n onChange({ target: { name, value: false } });\n confirmationModalRef.current.close();\n };\n\n return (\n <>\n \n onValueChange(newValue)} />\n \n \n Changing this user to a Service Account prevents the user from logging into the web interface and editing their settings. (e.g., API tokens) Do you wish to proceed?\n \n \n );\n }}\n\n \n );\n};\n\nexport default ServiceAccountFormGroup;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport { AuthzRolesActions } from 'stores/roles/AuthzRolesStore';\n\nimport notifyingAction from '../notifyingAction';\n\nconst load = notifyingAction({\n action: AuthzRolesActions.load,\n error: (error, roleId) => ({\n message: `Loading role with id \"${roleId}\" failed with status: ${error}`,\n }),\n notFoundRedirect: true,\n});\n\nconst deleteAction = notifyingAction({\n action: AuthzRolesActions.delete,\n success: (roleId, roleName) => ({\n message: `Role \"${roleName}\" was deleted successfully`,\n }),\n error: (error, roleId, roleName) => ({\n message: `Deleting role \"${roleName}\" failed with status: ${error}`,\n }),\n});\n\nconst addMembers = notifyingAction({\n action: AuthzRolesActions.addMembers,\n success: (roleId, usernames) => ({\n message: `Users:\"${usernames.join(', ')}\" were assigned successfully`,\n }),\n error: (error, roleId, usernames) => ({\n message: `Assigning users \"${usernames.join(', ')}\" failed with status: ${error}`,\n }),\n});\n\nconst removeMember = notifyingAction({\n action: AuthzRolesActions.removeMember,\n success: (roleId, username) => ({\n message: `User \"${username}\" was unassigned successfully`,\n }),\n error: (error, roleId, username) => ({\n message: `Unassign user \"${username}\" failed with status: ${error}`,\n }),\n});\n\nconst loadUsersForRole = notifyingAction({\n action: AuthzRolesActions.loadUsersForRole,\n error: (error, username, roleName) => ({\n message: `Loading users for role \"${roleName}\" failed with status: ${error}`,\n }),\n});\n\nconst loadRolesForUser = notifyingAction({\n action: AuthzRolesActions.loadRolesForUser,\n error: (error, username) => ({\n message: `Loading roles for user \"${username}\" failed with status: ${error}`,\n }),\n});\n\nconst loadRolesPaginated = notifyingAction({\n action: AuthzRolesActions.loadRolesPaginated,\n error: (error) => ({\n message: `Loading roles failed with status: ${error}`,\n }),\n});\n\nexport default {\n load,\n delete: deleteAction,\n addMembers,\n removeMember,\n loadUsersForRole,\n loadRolesForUser,\n loadRolesPaginated,\n};\n"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy