Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
web-interface.assets.e508fb3d-2708.1f7f91445bc6223827a9.js.map Maven / Gradle / Ivy
{"version":3,"file":"e508fb3d-2708.1f7f91445bc6223827a9.js","mappings":"kMA+HA,SACEA,QA5GaC,EAAAA,EAAAA,GAAgB,CAC7BC,OAAQC,EAAAA,EAAAA,OACRC,QAAS,SAACC,GAAD,MAAW,CAClBC,QAAS,SAAF,OAAWD,MAAAA,OAAX,EAAWA,EAAME,WAAjB,YAA+BF,MAAAA,OAA/B,EAA+BA,EAAMG,UAArC,gCAETC,MAAO,SAACA,EAAOJ,GAAR,MAAkB,CACvBC,QAAS,kBAAF,OAAoBD,MAAAA,OAApB,EAAoBA,EAAME,WAA1B,YAAwCF,MAAAA,OAAxC,EAAwCA,EAAMG,UAA9C,iCAAgFC,OAuGzFC,MAnGWT,EAAAA,EAAAA,GAAgB,CAC3BC,OAAQC,EAAAA,EAAAA,KACRM,MAAO,SAACA,EAAOE,GAAR,MAAoB,CACzBL,QAAS,yBAAF,OAA2BK,EAA3B,iCAA0DF,KAEnEG,kBAAkB,IA+FlBC,gBA5FqBZ,EAAAA,EAAAA,GAAgB,CACrCC,OAAQC,EAAAA,EAAAA,eACRM,MAAO,SAACA,EAAOK,GAAR,MAAsB,CAC3BR,QAAS,+BAAF,OAAiCQ,EAAjC,iCAAkEL,KAE3EG,kBAAkB,IAwFlBG,QArFad,EAAAA,EAAAA,GAAgB,CAC7BC,OAAQC,EAAAA,EAAAA,OACRC,QAAS,SAACO,EAAQK,EAASC,GAAlB,MAAgC,CACvCX,QAAS,SAAF,OAAWW,EAAX,gCAETR,MAAO,SAACA,EAAOE,EAAQK,EAASC,GAAzB,MAAuC,CAC5CX,QAAS,kBAAF,OAAoBW,EAApB,iCAAqDR,OAgF9DS,QA5EmBjB,EAAAA,EAAAA,GAAgB,CACnCC,OAAQC,EAAAA,EAA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KAAI,SAACtE,GAAD,OAAUwB,EAAAA,EAAAA,SAAsBxB,UAG/D,OAFAF,EAAasB,UAAUyC,QAAQA,GAExBA,GAGTxC,mBAxF8E,YA4FtC,IAHtCkD,EAGsC,EAHtCA,KACAC,EAEsC,EAFtCA,QACAC,EACsC,EADtCA,MAEMf,GAAMgB,EAAAA,EAAAA,GAAcd,EAAAA,EAAAA,mBAAAA,YAAyCF,IAAKa,EAAMC,EAASC,GAEjFZ,GAAUC,EAAAA,EAAAA,IAAM,OAAOH,EAAAA,EAAAA,IAAWD,IAAMM,MAAK,SAACG,GAAD,MAAuC,CACxFQ,UAAWR,EAASS,QAAQC,WAAarD,EAAAA,EAAAA,SAAsB2C,EAASS,QAAQC,iBAAcC,EAC9FC,KAAMxC,EAAAA,KAAe4B,EAASE,MAAMC,KAAI,SAACtE,GAAD,OAAUwB,EAAAA,EAAAA,SAAsBxB,OACxEgF,WAAY,CACVT,KAAMJ,EAASI,KACfC,QAASL,EAASc,SAClBR,MAAON,EAASM,MAChBS,MAAOf,EAASe,MAChBC,MAAOhB,EAASgB,WAMpB,OAFArF,EAAauB,mBAAmBwC,QAAQA,GAEjCA,GAGTvC,UAhH8E,SAgHpEhB,EAAgBiB,GACxB,IAAMmC,GAAMC,EAAAA,EAAAA,IAAWC,EAAAA,EAAAA,mBAAAA,UAAuCtD,EAAQiB,GAAemC,KAC/EG,GAAUC,EAAAA,EAAAA,IAAM,MAAOJ,GAG7B,OAFA5D,EAAawB,UAAUuC,QAAQA,GAExBA","sources":["webpack://graylog-web-interface/./src/domainActions/users/UsersDomain.ts","webpack://graylog-web-interface/./src/logic/users/UserOverview.ts","webpack://graylog-web-interface/./src/stores/users/UsersStore.ts"],"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 { UsersActions } from 'stores/users/UsersStore';\n\nimport notifyingAction from '../notifyingAction';\n\nconst create = notifyingAction({\n action: UsersActions.create,\n success: (user) => ({\n message: `User \"${user?.first_name} ${user?.last_name}\" was created successfully`,\n }),\n error: (error, user) => ({\n message: `Creating user \"${user?.first_name} ${user?.last_name}\" failed with status: ${error}`,\n }),\n});\n\nconst load = notifyingAction({\n action: UsersActions.load,\n error: (error, userId) => ({\n message: `Loading user with id \"${userId}\" failed with status: ${error}`,\n }),\n notFoundRedirect: true,\n});\n\nconst loadByUsername = notifyingAction({\n action: UsersActions.loadByUsername,\n error: (error, username) => ({\n message: `Loading user with username \"${username}\" failed with status: ${error}`,\n }),\n notFoundRedirect: true,\n});\n\nconst update = notifyingAction({\n action: UsersActions.update,\n success: (userId, payload, fullName) => ({\n message: `User \"${fullName}\" was updated successfully`,\n }),\n error: (error, userId, payload, fullName) => ({\n message: `Updating user \"${fullName}\" failed with status: ${error}`,\n }),\n});\n\nconst deleteAction = notifyingAction({\n action: UsersActions.delete,\n success: (userId, fullName) => ({\n message: `User \"${fullName}\" was deleted successfully`,\n }),\n error: (error, userId, fullName) => ({\n message: `Deleting user \"${fullName}\" failed with status: ${error}`,\n }),\n});\n\nconst changePassword = notifyingAction({\n action: UsersActions.changePassword,\n success: () => ({\n message: 'Password was changed successfully ',\n }),\n error: (error, userId) => ({\n message: `Changing password for user with id \"${userId}\" failed with status: ${error}`,\n }),\n});\n\nconst createToken = notifyingAction({\n action: UsersActions.createToken,\n success: (userId, tokenName) => ({\n message: `Token \"${tokenName}\" created successfully`,\n }),\n error: (error, userId, tokenName) => ({\n message: `Creating token \"${tokenName}\" for user with id \"${userId}\" failed with status: ${error}`,\n }),\n});\n\nconst loadTokens = notifyingAction({\n action: UsersActions.loadTokens,\n error: (error, userId) => ({\n message: `Loading tokens for user with id \"${userId}\" failed with status: ${error}`,\n }),\n});\n\nconst deleteToken = notifyingAction({\n action: UsersActions.deleteToken,\n success: (userId, tokenId, tokenName) => ({\n message: `Token \"${tokenName}\" deleted successfully`,\n }),\n error: (error, userId, tokenId, tokenName) => ({\n message: `Deleting token \"${tokenName}\" for user with id \"${userId}\" failed with status: ${error}`,\n }),\n});\n\nconst loadUsers = notifyingAction({\n action: UsersActions.loadUsers,\n error: (error) => ({\n message: `Loading users failed with status: ${error}`,\n }),\n});\n\nconst loadUsersPaginated = notifyingAction({\n action: UsersActions.loadUsersPaginated,\n error: (error) => ({\n message: `Loading users failed with status: ${error}`,\n }),\n});\n\nconst setStatus = notifyingAction({\n action: UsersActions.setStatus,\n success: (userId, accountStatus) => ({\n message: `User \"${userId}\" was set to ${accountStatus}`,\n }),\n error: (error, userId, accountStatus) => ({\n message: `Updating user (\"${userId}\") to ${accountStatus} failed with status: ${error}`,\n }),\n});\n\nexport default {\n create,\n load,\n loadByUsername,\n update,\n delete: deleteAction,\n changePassword,\n createToken,\n loadTokens,\n deleteToken,\n loadUsers,\n loadUsersPaginated,\n setStatus,\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 type { $PropertyType } from 'utility-types';\nimport * as Immutable from 'immutable';\n\nexport type AccountStatus = 'enabled' | 'disabled' | 'deleted';\n\nexport type UserOverviewJSON = {\n id: string;\n username: string;\n full_name: string;\n email: string;\n external_user: boolean | null | undefined;\n roles: Array;\n read_only: boolean | null | undefined;\n session_active: boolean | null | undefined;\n client_address: string;\n last_activity: string | null | undefined;\n enabled: boolean;\n auth_service_id: string;\n auth_service_uid: string;\n account_status: AccountStatus;\n};\n\ntype InternalState = {\n id: string;\n username: string;\n fullName: string;\n email: string;\n roles: Immutable.Set;\n readOnly: boolean;\n external: boolean;\n sessionActive: boolean;\n clientAddress: string;\n lastActivity: string | null | undefined;\n enabled: boolean;\n authServiceId: string;\n authServiceUid: string;\n accountStatus: AccountStatus;\n};\n\nexport default class UserOverview {\n _value: InternalState;\n\n constructor(\n id: $PropertyType,\n username: $PropertyType,\n fullName: $PropertyType,\n email: $PropertyType,\n roles: $PropertyType,\n readOnly: $PropertyType,\n external: $PropertyType,\n sessionActive: $PropertyType,\n clientAddress: $PropertyType,\n lastActivity: $PropertyType,\n enabled: $PropertyType,\n authServiceId: $PropertyType,\n authServiceUid: $PropertyType,\n accountStatus: $PropertyType,\n ) {\n this._value = {\n id,\n username,\n fullName,\n email,\n roles,\n readOnly,\n external,\n sessionActive,\n clientAddress,\n lastActivity,\n enabled,\n authServiceId,\n authServiceUid,\n accountStatus,\n };\n }\n\n get id() {\n return this._value.id;\n }\n\n get username() {\n return this._value.username;\n }\n\n get name() {\n return this._value.username;\n }\n\n get fullName() {\n return this._value.fullName;\n }\n\n get description() {\n return this._value.fullName;\n }\n\n get email() {\n return this._value.email;\n }\n\n get roles() {\n return this._value.roles;\n }\n\n get readOnly() {\n return this._value.readOnly;\n }\n\n get external() {\n return this._value.external;\n }\n\n get sessionActive() {\n return this._value.sessionActive;\n }\n\n get clientAddress() {\n return this._value.clientAddress;\n }\n\n get lastActivity() {\n return this._value.lastActivity;\n }\n\n get enabled() {\n return this._value.enabled;\n }\n\n get authServiceId() {\n return this._value.authServiceId;\n }\n\n get authServiceUid() {\n return this._value.authServiceUid;\n }\n\n get accountStatus() {\n return this._value.accountStatus;\n }\n\n toBuilder() {\n const {\n id,\n username,\n fullName,\n email,\n roles,\n readOnly,\n external,\n sessionActive,\n clientAddress,\n lastActivity,\n enabled,\n authServiceId,\n authServiceUid,\n accountStatus,\n } = this._value;\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return new Builder(Immutable.Map({\n id,\n username,\n fullName,\n email,\n roles,\n readOnly,\n external,\n sessionActive,\n clientAddress,\n lastActivity,\n enabled,\n authServiceId,\n authServiceUid,\n accountStatus,\n }));\n }\n\n static create(\n id: $PropertyType,\n username: $PropertyType,\n fullName: $PropertyType,\n email: $PropertyType,\n roles: $PropertyType,\n readOnly: $PropertyType,\n external: $PropertyType,\n sessionActive: $PropertyType,\n clientAddress: $PropertyType,\n lastActivity: $PropertyType,\n enabled: $PropertyType,\n authServiceId: $PropertyType,\n authServiceUid: $PropertyType,\n accountStatus: $PropertyType,\n ) {\n return new UserOverview(\n id,\n username,\n fullName,\n email,\n roles,\n readOnly,\n external,\n sessionActive,\n clientAddress,\n lastActivity,\n enabled,\n authServiceId,\n authServiceUid,\n accountStatus,\n );\n }\n\n toJSON(): UserOverviewJSON {\n const {\n id,\n username,\n fullName,\n email,\n roles,\n readOnly,\n external,\n sessionActive,\n clientAddress,\n lastActivity,\n enabled,\n authServiceId,\n authServiceUid,\n accountStatus,\n } = this._value;\n\n return {\n id,\n username,\n full_name: fullName,\n email,\n roles: roles.toArray(),\n read_only: readOnly,\n external_user: external,\n session_active: sessionActive,\n client_address: clientAddress,\n last_activity: lastActivity,\n enabled,\n auth_service_id: authServiceId,\n auth_service_uid: authServiceUid,\n account_status: accountStatus,\n };\n }\n\n static fromJSON(value: UserOverviewJSON) {\n const {\n id,\n username,\n full_name: fullName,\n email,\n roles,\n read_only: readOnly,\n external_user: external,\n session_active: sessionActive,\n client_address: clientAddress,\n last_activity: lastActivity,\n enabled,\n auth_service_id: authServiceId,\n auth_service_uid: authServiceUid,\n account_status: accountStatus,\n } = value;\n\n return UserOverview.create(id,\n username,\n fullName,\n email,\n Immutable.Set(roles),\n readOnly ?? false,\n external ?? false,\n sessionActive ?? false,\n clientAddress,\n lastActivity,\n enabled,\n authServiceId,\n authServiceUid,\n accountStatus);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\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 username(value: $PropertyType) {\n return new Builder(this.value.set('username', value));\n }\n\n fullName(value: $PropertyType) {\n return new Builder(this.value.set('fullName', value));\n }\n\n email(value: $PropertyType) {\n return new Builder(this.value.set('email', value));\n }\n\n roles(value: $PropertyType) {\n return new Builder(this.value.set('roles', value));\n }\n\n readOnly(value: $PropertyType) {\n return new Builder(this.value.set('readOnly', value));\n }\n\n external(value: $PropertyType) {\n return new Builder(this.value.set('external', value));\n }\n\n sessionActive(value: $PropertyType) {\n return new Builder(this.value.set('sessionActive', value));\n }\n\n clientAddress(value: $PropertyType) {\n return new Builder(this.value.set('clientAddress', value));\n }\n\n lastActivity(value: $PropertyType) {\n return new Builder(this.value.set('lastActivity', value));\n }\n\n enabled(value: $PropertyType) {\n return new Builder(this.value.set('enabled', value));\n }\n\n authServiceId(value: $PropertyType) {\n return new Builder(this.value.set('authServiceId', value));\n }\n\n authServiceUid(value: $PropertyType) {\n return new Builder(this.value.set('authServiceUid', value));\n }\n\n accountStatus(value: $PropertyType) {\n return new Builder(this.value.set('accountStatus', value));\n }\n\n build() {\n const {\n id,\n username,\n fullName,\n email,\n roles,\n readOnly,\n external,\n sessionActive,\n clientAddress,\n lastActivity,\n enabled,\n authServiceId,\n authServiceUid,\n accountStatus,\n } = this.value.toObject();\n\n return new UserOverview(\n id,\n username,\n fullName,\n email,\n roles,\n readOnly,\n external,\n sessionActive,\n clientAddress,\n lastActivity,\n enabled,\n authServiceId,\n authServiceUid,\n accountStatus,\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';\nimport type { $PropertyType, $Shape } from 'utility-types';\n\nimport type { UserOverviewJSON, AccountStatus } from 'logic/users/UserOverview';\nimport UserOverview from 'logic/users/UserOverview';\nimport fetch from 'logic/rest/FetchProvider';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport { singletonStore, singletonActions } from 'logic/singleton';\nimport { qualifyUrl } from 'util/URLUtils';\nimport PaginationURL from 'util/PaginationURL';\nimport type { UserJSON } from 'logic/users/User';\nimport User from 'logic/users/User';\nimport type { PaginatedListJSON, Pagination, PaginatedList } from 'stores/PaginationTypes';\n\nexport type PaginatedUsersResponse = PaginatedListJSON & {\n users: Array;\n context: {\n admin_user: UserOverviewJSON;\n };\n};\n\nexport type UserCreate = {\n email: $PropertyType;\n full_name: $PropertyType;\n first_name: $PropertyType;\n last_name: $PropertyType;\n password: string;\n permissions: $PropertyType;\n roles: $PropertyType;\n session_timeout_ms: $PropertyType;\n timezone: $PropertyType;\n username: $PropertyType;\n};\n\nexport type UserUpdate = $Shape;\n\nexport type Token = {\n id: string;\n name: string;\n token: string;\n last_access: string;\n};\n\nexport type TokenSummary = {\n id: string,\n name: string,\n last_access: string,\n};\n\nexport type ChangePasswordRequest = {\n old_password: string;\n password: string;\n};\n\nexport type PaginatedUsers = PaginatedList & {\n adminUser: UserOverview | null | undefined,\n};\n\nexport type ActionsType = {\n create: (user: UserCreate) => Promise;\n load: (userId: string) => Promise;\n loadByUsername: (username: string) => Promise;\n update: (userId: string, request: UserUpdate, fullName: string) => Promise;\n delete: (userId: string, fullName: string) => Promise;\n changePassword: (userId: string, request: ChangePasswordRequest) => Promise;\n createToken: (userId: string, tokenName: string) => Promise;\n loadTokens: (userId: string) => Promise;\n deleteToken: (userId: string, tokenId: string, tokenName: string) => Promise;\n loadUsers: () => Promise>;\n loadUsersPaginated: (pagination: Pagination) => Promise;\n setStatus: (userId: string, newStatus: AccountStatus) => Promise;\n};\n\nexport const UsersActions = singletonActions(\n 'core.Users',\n () => Reflux.createActions({\n create: { asyncResult: true },\n load: { asyncResult: true },\n loadByUsername: { asyncResult: true },\n update: { asyncResult: true },\n delete: { asyncResult: true },\n changePassword: { asyncResult: true },\n createToken: { asyncResult: true },\n loadTokens: { asyncResult: true },\n deleteToken: { asyncResult: true },\n loadUsersPaginated: { asyncResult: true },\n loadUsers: { asyncResult: true },\n setStatus: { asyncResult: true },\n }),\n);\n\nexport const UsersStore = singletonStore('core.Users', () => Reflux.createStore({\n listenables: [UsersActions],\n\n create(user: UserCreate): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.create().url);\n const promise = fetch('POST', url, user);\n UsersActions.create.promise(promise);\n\n return promise;\n },\n\n load(id: string): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.load(encodeURIComponent(id)).url);\n const promise = fetch('GET', url).then(User.fromJSON);\n\n UsersActions.load.promise(promise);\n\n return promise;\n },\n\n loadByUsername(userId: string): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.loadByUsername(encodeURIComponent(userId)).url);\n const promise = fetch('GET', url).then(User.fromJSON);\n\n UsersActions.loadByUsername.promise(promise);\n\n return promise;\n },\n\n update(userId: string, user: UserUpdate): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.update(encodeURIComponent(userId)).url);\n const promise = fetch('PUT', url, user);\n UsersActions.update.promise(promise);\n\n return promise;\n },\n\n delete(userId: string): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.delete(encodeURIComponent(userId)).url);\n const promise = fetch('DELETE', url);\n\n UsersActions.delete.promise(promise);\n\n return promise;\n },\n\n changePassword(userId: string, request: ChangePasswordRequest): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.changePassword(encodeURIComponent(userId)).url);\n const promise = fetch('PUT', url, request);\n UsersActions.changePassword.promise(promise);\n\n return promise;\n },\n\n createToken(userId: string, tokenName: string): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.create_token(encodeURIComponent(userId), encodeURIComponent(tokenName)).url);\n const promise = fetch('POST', url);\n UsersActions.createToken.promise(promise);\n\n return promise;\n },\n\n loadTokens(userId: string): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.list_tokens(encodeURIComponent(userId)).url);\n const promise = fetch('GET', url).then((response) => response.tokens);\n UsersActions.loadTokens.promise(promise);\n\n return promise;\n },\n\n deleteToken(userId: string, tokenId: string): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.delete_token(encodeURIComponent(userId), encodeURIComponent(tokenId)).url);\n const promise = fetch('DELETE', url);\n UsersActions.deleteToken.promise(promise);\n\n return promise;\n },\n\n loadUsers(): Promise> {\n const url = qualifyUrl(ApiRoutes.UsersApiController.list().url);\n const promise = fetch('GET', url).then(({\n users,\n }) => Immutable.List(users.map((user) => UserOverview.fromJSON(user))));\n UsersActions.loadUsers.promise(promise);\n\n return promise;\n },\n\n loadUsersPaginated({\n page,\n perPage,\n query,\n }: Pagination): Promise {\n const url = PaginationURL(ApiRoutes.UsersApiController.paginated().url, page, perPage, query);\n\n const promise = fetch('GET', qualifyUrl(url)).then((response: PaginatedUsersResponse) => ({\n adminUser: response.context.admin_user ? UserOverview.fromJSON(response.context.admin_user) : undefined,\n list: Immutable.List(response.users.map((user) => UserOverview.fromJSON(user))),\n pagination: {\n page: response.page,\n perPage: response.per_page,\n query: response.query,\n count: response.count,\n total: response.total,\n },\n }));\n\n UsersActions.loadUsersPaginated.promise(promise);\n\n return promise;\n },\n\n setStatus(userId: string, accountStatus: AccountStatus): Promise {\n const url = qualifyUrl(ApiRoutes.UsersApiController.setStatus(userId, accountStatus).url);\n const promise = fetch('PUT', url);\n UsersActions.setStatus.promise(promise);\n\n return promise;\n },\n}));\n"],"names":["create","notifyingAction","action","UsersActions","success","user","message","first_name","last_name","error","load","userId","notFoundRedirect","loadByUsername","username","update","payload","fullName","delete","changePassword","createToken","tokenName","loadTokens","deleteToken","tokenId","loadUsers","loadUsersPaginated","setStatus","accountStatus","UserOverview","id","email","roles","readOnly","external","sessionActive","clientAddress","lastActivity","enabled","authServiceId","authServiceUid","this","_value","Builder","Immutable","full_name","toArray","read_only","external_user","session_active","client_address","last_activity","auth_service_id","auth_service_uid","account_status","value","set","toObject","singletonActions","Reflux","asyncResult","singletonStore","listenables","url","qualifyUrl","ApiRoutes","promise","fetch","encodeURIComponent","then","User","request","response","tokens","users","map","page","perPage","query","PaginationURL","adminUser","context","admin_user","undefined","list","pagination","per_page","count","total"],"sourceRoot":""}