From a5116b6c7b2f9ffadafeb30a068b6a02c0ed95c5 Mon Sep 17 00:00:00 2001 From: srosset81 Date: Fri, 31 May 2024 08:46:23 +0200 Subject: [PATCH] Fix NewPasswordForm (passwords should not be lower-cased!) --- src/frontend/packages/auth-provider/dist/index.cjs.js | 6 ++---- src/frontend/packages/auth-provider/dist/index.cjs.js.map | 2 +- src/frontend/packages/auth-provider/dist/index.es.js | 6 ++---- src/frontend/packages/auth-provider/dist/index.es.js.map | 2 +- .../src/components/LocalLoginPage/NewPasswordForm.js | 2 -- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/frontend/packages/auth-provider/dist/index.cjs.js b/src/frontend/packages/auth-provider/dist/index.cjs.js index 4e2a5a94d..9bd4b90ad 100644 --- a/src/frontend/packages/auth-provider/dist/index.cjs.js +++ b/src/frontend/packages/auth-provider/dist/index.cjs.js @@ -1995,8 +1995,7 @@ const $176df6bd8edc5f4d$var$useStyles = (0, ($parcel$interopDefault($4Uj5b$muist (0, $4Uj5b$reactadmin.required)(), (0, $eab41bc89667b2c6$export$2e2bcd8739ae039)(passwordScorer) ], - onChange: (e)=>setNewPassword(e.target.value), - format: (value)=>value ? value.toLowerCase() : "" + onChange: (e)=>setNewPassword(e.target.value) }), /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { autoFocus: true, @@ -2006,8 +2005,7 @@ const $176df6bd8edc5f4d$var$useStyles = (0, ($parcel$interopDefault($4Uj5b$muist autoComplete: "current-password", fullWidth: true, disabled: loading, - validate: (0, $4Uj5b$reactadmin.required)(), - format: (value)=>value ? value.toLowerCase() : "" + validate: (0, $4Uj5b$reactadmin.required)() }), /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$muimaterial.Button), { variant: "contained", diff --git a/src/frontend/packages/auth-provider/dist/index.cjs.js.map b/src/frontend/packages/auth-provider/dist/index.cjs.js.map index 1b65b0b26..bdec97997 100644 --- a/src/frontend/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c;YACZ,0BAA0B;YAC1B,sBAAsB;YACtB,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;QACzB;IACF;AACF;IAEA,2CAAe;;;ACzFf,MAAM,uCAAiB;IACrB,MAAM;QACJ,QAAQ;YACN,uBAAuB;YACvB,sBAAsB;YACtB,gBAAgB;QAClB;QACA,QAAQ;YACN,aAAa;YACb,QAAQ;YACR,gBAAgB;YAChB,kBAAkB;YAClB,QAAQ;YACR,OAAO;YACP,iBAAiB;YACjB,iBAAiB;QACnB;QACA,OAAO;YACL,UAAU;gBACR,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,SAAS;YACX;YACA,WAAW;gBACT,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,SAAS;YACX;QACF;QACA,OAAO;YACL,WAAW;YACX,eAAe;QACjB;QACA,OAAO;YACL,cAAc;YACd,MAAM;YACN,UAAU;YACV,OAAO;YACP,mBAAmB;YACnB,kBAAkB;YAClB,cAAc;YACd,sBAAsB;YACtB,mBAAmB;YACnB,mBAAmB;QACrB;QACA,QAAQ;YACN,OAAO;YACP,QAAQ;YACR,gBACE;YACF,kBAAkB;QACpB;QACA,SAAS;YACP,yBAAyB;YACzB,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,4BAA4B;YAC5B,0BAA0B;YAC1B,2BAA2B;YAC3B,mBAAmB;YACnB,wBAAwB;YACxB,2BAA2B;YAC3B,sBAAsB;YACtB,kBAAkB;YAClB,gBAAgB;YAChB,kBACE;YACF,kBAAkB;YAClB,gBAAgB;YAChB,mBAAmB;YACnB,aAAa;YACb,0BAA0B;YAC1B,mBAAmB;YACnB,qBACE;QACJ;QACA,cAAc;YACZ,0BAA0B;YAC1B,sBAAsB;YACtB,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;QACzB;IACF;AACF;IAEA,2CAAe;","sources":["packages/auth-provider/src/index.ts","packages/auth-provider/src/authProvider.js","packages/auth-provider/src/utils.js","packages/auth-provider/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/hooks/useCheckPermissions.js","packages/auth-provider/src/constants.js","packages/auth-provider/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/crud/edit/EditActionsWithPermissions.js","packages/auth-provider/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/hooks/useAgents.js","packages/auth-provider/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/crud/show/ShowActionsWithPermissions.js","packages/auth-provider/src/components/AuthDialog.js","packages/auth-provider/src/components/SsoLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/SignupForm.js","packages/auth-provider/src/hooks/useSignup.js","packages/auth-provider/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/passwordScorer.js","packages/auth-provider/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/components/LocalLoginPage/LoginForm.js","packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/components/ResourceWithPermissions.js","packages/auth-provider/src/components/UserMenu.js","packages/auth-provider/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/messages/english.js","packages/auth-provider/src/messages/french.js"],"sourcesContent":["export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport * as oauth from 'oauth4webapi';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl, delay } from './utils';\n\nconst AUTH_TYPE_SSO = 'sso';\nconst AUTH_TYPE_LOCAL = 'local';\nconst AUTH_TYPE_POD = 'pod';\nconst AUTH_TYPE_SOLID_OIDC = 'solid-oidc';\n\nconst authProvider = ({\n dataProvider,\n authType,\n allowAnonymous = true,\n checkUser,\n checkPermissions = false,\n clientId\n}) => {\n if (![AUTH_TYPE_SSO, AUTH_TYPE_LOCAL, AUTH_TYPE_POD, AUTH_TYPE_SOLID_OIDC].includes(authType))\n throw new Error('The authType parameter is missing from the auth provider');\n if (authType === AUTH_TYPE_SOLID_OIDC && !clientId)\n throw new Error('The clientId parameter is required for solid-oidc authentication');\n return {\n login: async params => {\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const { webId, issuer } = params;\n\n if (webId && !issuer) {\n // TODO find issuer from webId\n }\n\n const as = await oauth\n .discoveryRequest(new URL(issuer))\n .then(response => oauth.processDiscoveryResponse(new URL(issuer), response));\n\n const codeVerifier = oauth.generateRandomCodeVerifier();\n const codeChallenge = await oauth.calculatePKCECodeChallenge(codeVerifier);\n const codeChallengeMethod = 'S256';\n\n // Save to use on handleCallback method\n localStorage.setItem('code_verifier', codeVerifier);\n\n const authorizationUrl = new URL(as.authorization_endpoint);\n authorizationUrl.searchParams.set('response_type', 'code');\n authorizationUrl.searchParams.set('client_id', clientId);\n authorizationUrl.searchParams.set('code_challenge', codeChallenge);\n authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);\n authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);\n authorizationUrl.searchParams.set('scope', 'openid webid offline_access');\n\n window.location = authorizationUrl;\n } else if (authType === AUTH_TYPE_LOCAL) {\n const { username, password, interactionId, redirectTo } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n password: password.trim(),\n interactionId\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n if (redirectTo) {\n if (interactionId) await delay(3000); // Ensure the interactionId has been received and processed\n window.location.href = redirectTo;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n }\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n } else if (authType === AUTH_TYPE_SSO) {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n if (params.redirect) redirectUrl += `&redirect=${encodeURIComponent(params.redirect)}`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n handleCallback: async () => {\n const { searchParams } = new URL(window.location);\n\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const issuer = new URL(searchParams.get('iss'));\n const as = await oauth\n .discoveryRequest(issuer)\n .then(response => oauth.processDiscoveryResponse(issuer, response));\n\n const client = {\n client_id: clientId,\n token_endpoint_auth_method: 'none' // We don't have a client secret\n };\n\n const currentUrl = new URL(window.location.href);\n const params = oauth.validateAuthResponse(as, client, currentUrl, oauth.expectNoState);\n if (oauth.isOAuth2Error(params)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Retrieve code verifier set during login\n const codeVerifier = localStorage.getItem('code_verifier');\n\n const response = await oauth.authorizationCodeGrantRequest(\n as,\n client,\n params,\n `${window.location.origin}/auth-callback`,\n codeVerifier\n );\n\n const result = await oauth.processAuthorizationCodeOpenIDResponse(as, client, response);\n if (oauth.isOAuth2Error(result)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Until DPoP is implemented, use the ID token to log into local Pod\n // And the proxy endpoint to log into remote Pods\n localStorage.setItem('token', result.id_token);\n\n // Remove code verifier now we don't need it anymore\n localStorage.removeItem('code_verifier');\n\n // Reload to ensure the dataServer config is reset\n window.location.href = '/';\n } else {\n const token = searchParams.get('token');\n if (!token) throw new Error('auth.message.no_token_returned');\n\n let webId;\n try {\n ({ webId } = jwtDecode(token));\n } catch (e) {\n throw new Error('auth.message.invalid_token_returned');\n }\n const { json } = await dataProvider.fetch(webId);\n\n if (!json) throw new Error('auth.message.unable_to_fetch_user_data');\n\n if (checkUser && !checkUser(json)) throw new Error('auth.message.user_not_allowed_to_login');\n\n localStorage.setItem('token', token);\n\n // Reload to ensure the dataServer config is reset\n window.location.href = '/';\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (authType === AUTH_TYPE_LOCAL) {\n const { username, email, password, domain, interactionId, ...profileData } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n email: email.trim(),\n password: password.trim(),\n interactionId,\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n const { webId } = jwtDecode(token);\n return webId;\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error(e.message || 'ra.auth.sign_in_error');\n }\n }\n } else {\n const redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n logout: async () => {\n switch (authType) {\n case AUTH_TYPE_LOCAL: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n let result = {};\n\n try {\n result = await dataProvider.fetch(urlJoin(authServerUrl, '.well-known/openid-configuration'));\n } catch (e) {\n // Do nothing if it fails\n }\n\n if (result.status === 200 && result.json) {\n // Redirect to OIDC endpoint if it exists\n window.location.href = result.json.end_session_endpoint;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n }\n\n break;\n }\n\n case AUTH_TYPE_SSO: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n const baseUrl = new URL(window.location.href).origin;\n return urlJoin(\n authServerUrl,\n `auth/logout?redirectUrl=${encodeURIComponent(`${urlJoin(baseUrl, 'login')}?logout=true`)}`\n );\n }\n\n case AUTH_TYPE_POD: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n // Delete token but also any other value in local storage\n localStorage.clear();\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://activitypods.org/ns/core#FrontAppRegistration'\n )}`;\n }\n break;\n }\n\n case AUTH_TYPE_SOLID_OIDC: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webid: webId } = jwtDecode(token); // Not webId !!\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://www.w3.org/ns/solid/interop#ApplicationRegistration'\n )}`;\n }\n break;\n }\n\n default:\n break;\n }\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n }\n return true;\n },\n checkError: error => Promise.resolve(),\n getPermissions: async uri => {\n if (!checkPermissions) return;\n\n // React-admin calls getPermissions with an empty object on every page refresh\n // It also passes an object `{ params: { route: 'dashboard' } }` on the Dashboard\n // Ignore all this until we found a way to bypass these redundant calls\n if (typeof uri === 'object') return;\n\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch (e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const authorization = {\n '@id': `#${mode.replace('acl:', '')}`,\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n const { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const payload = jwtDecode(token);\n const webId = payload.webId || payload.webid; // Currently we must deal with both formats\n\n if (!webId) throw new Error('No webId found on provided token !');\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName:\n profileData?.['vcard:given-name'] ||\n profileData?.['pair:label'] ||\n webIdData['foaf:name'] ||\n webIdData['pair:label'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('auth.notification.reset_password_error');\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('auth.notification.new_password_error');\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('auth.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({\n currentPassword,\n email: email?.trim(),\n newPassword\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('auth.notification.invalid_password');\n }\n\n throw new Error('auth.notification.update_settings_error');\n }\n }\n };\n};\n\nexport default authProvider;\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a POD, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? new URL(authServer.baseUrl).origin : authServer.baseUrl;\n};\n\nexport const delay = async t => new Promise(resolve => setTimeout(resolve, t));\n","import React from 'react';\nimport { Create, CreateActions, useResourceContext } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const resource = useResourceContext();\n const createContainerUri = useCreateContainer(resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import React, { useEffect } from 'react';\nimport { usePermissions, useRedirect, useNotify, useGetIdentity } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\n\nconst useCheckPermissions = (uri, mode, redirectUrl = '/') => {\n const { identity, isLoading } = useGetIdentity();\n const { permissions } = usePermissions(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (!isLoading && identity && permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], { type: 'error' });\n redirect(redirectUrl);\n }\n }, [permissions, identity, redirect, notify, isLoading]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","export const ACL_READ = 'acl:Read';\nexport const ACL_APPEND = 'acl:Append';\nexport const ACL_WRITE = 'acl:Write';\nexport const ACL_CONTROL = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React from 'react';\nimport { Edit, useGetRecordId } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport {\n usePermissionsOptimized,\n ShowButton,\n ListButton,\n TopToolbar,\n useResourceDefinition,\n useRecordContext\n} from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl } from '../../constants';\n\nconst EditActionsWithPermissions = () => {\n const { hasList, hasShow } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasShow && }\n {!!permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React, { useState } from 'react';\nimport { Button, useRecordContext, useResourceContext } from 'react-admin';\nimport ShareIcon from '@mui/icons-material/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ isContainer }) => {\n const record = useRecordContext();\n const resource = useResourceContext();\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nPermissionsButton.defaultProps = {\n isContainer: false\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport PersonIcon from '@mui/icons-material/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { data } = useGetList(\n 'Person',\n {\n pagination: { page: 1, perPage: 100 },\n sort: { field: 'pair:label', order: 'ASC' },\n filter: { q: inputValue }\n },\n {\n enabled: inputValue.length > 0\n }\n );\n\n useEffect(() => {\n setOptions(data?.length > 0 ? Object.values(data) : []);\n }, [data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={(props, option) => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport { List } from '@mui/material';\nimport { styled } from '@mui/system';\nimport AgentItem from './AgentItem';\n\nconst StyledList = styled(List)(({ theme }) => ({\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport EditIcon from '@mui/icons-material/Edit';\nimport CheckIcon from '@mui/icons-material/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport PublicIcon from '@mui/icons-material/Public';\nimport VpnLockIcon from '@mui/icons-material/VpnLock';\nimport PersonIcon from '@mui/icons-material/Person';\nimport GroupIcon from '@mui/icons-material/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error(`Unknown agent predicate: ${agent.predicate}`);\n }\n};\n\nexport default AgentIcon;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissions, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissions(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n const result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (const p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { SaveButton, Toolbar, ToolbarProps } from 'react-admin';\nimport { styled } from '@mui/material/styles';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst StyledToolbar = styled(Toolbar)(() => ({\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n}));\n\nconst EditToolbarWithPermissions: React.FunctionComponent = props => (\n \n \n \n \n);\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { EditButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToEdit } from '../../constants';\n\nconst EditButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToEdit.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default EditButtonWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport {\n CreateButton,\n ExportButton,\n useResourceDefinition,\n TopToolbar,\n usePermissions,\n useResourceContext\n} from 'react-admin';\nimport { useMediaQuery } from '@mui/material';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n sort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n selectedIds,\n showFilter,\n total\n}) => {\n const resource = useResourceContext();\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition();\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissions(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n filterValues,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { Show, useGetRecordId } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'show');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport {\n EditButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext\n} from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit } from '../../constants';\n\nconst ShowActionsWithPermissions = () => {\n const { hasList, hasEdit } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n return (\n \n {hasList && }\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useRef, useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useDataProvider, useAuthProvider, useLogin, useGetIdentity, useNotify } from 'react-admin';\nimport { Card, Avatar, Typography, Button, CardActions } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport LockIcon from '@mui/icons-material/Lock';\n\nconst delay = async t => new Promise(resolve => setTimeout(resolve, t));\n\n// Inspired from https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/auth/Login.tsx\nconst SsoLoginPage = ({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }) => {\n const containerRef = useRef();\n let backgroundImageLoaded = false;\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { identity, isLoading } = useGetIdentity();\n\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n // Already authenticated, redirect to the home page\n navigate(searchParams.get('redirect') || '/');\n }\n }, [identity, isLoading, navigate, searchParams]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', { type: 'error' });\n } else {\n notify('auth.message.bad_request', { type: 'error', messageArgs: { error: searchParams.get('error') } });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n localStorage.setItem('token', token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n localStorage.removeItem('token');\n notify('auth.message.user_not_allowed_to_login', { type: 'error' });\n navigate.replace('/login');\n } else if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = searchParams.get('redirect');\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', { type: 'info' });\n window.location.href = `/${userResource}/${encodeURIComponent(webId)}`;\n } else {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = '/';\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', { type: 'info' });\n navigate('/');\n }\n })();\n }, [searchParams, navigate, notify, userResource]);\n\n const updateBackgroundImage = () => {\n if (!backgroundImageLoaded && containerRef.current) {\n containerRef.current.style.backgroundImage = `url(${backgroundImage})`;\n backgroundImageLoaded = true;\n }\n };\n\n // Load background image asynchronously to speed up time to interactive\n const lazyLoadBackgroundImage = () => {\n if (backgroundImage) {\n const img = new Image();\n img.onload = updateBackgroundImage;\n img.src = backgroundImage;\n }\n };\n\n useEffect(() => {\n if (!backgroundImageLoaded) {\n lazyLoadBackgroundImage();\n }\n });\n\n if (isLoading) return null;\n\n return (\n \n \n
\n \n \n \n
\n {text && {text}}\n {buttons?.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n );\n};\n\nconst PREFIX = 'SsoLoginPage';\n\nexport const SsoLoginPageClasses = {\n card: `${PREFIX}-card`,\n avatar: `${PREFIX}-avatar`,\n icon: `${PREFIX}-icon`,\n switch: `${PREFIX}-switch`\n};\n\nconst Root = styled('div', {\n name: PREFIX,\n overridesResolver: (props, styles) => styles.root\n})(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',\n [`& .${SsoLoginPageClasses.card}`]: {\n minWidth: 300,\n marginTop: '6em'\n },\n [`& .${SsoLoginPageClasses.avatar}`]: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n [`& .${SsoLoginPageClasses.icon}`]: {\n backgroundColor: theme.palette.secondary[500]\n },\n [`& .${SsoLoginPageClasses.switch}`]: {\n marginBottom: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import React, { useEffect, useMemo } from 'react';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport { useTranslate, useGetIdentity } from 'react-admin';\nimport { Card, Typography } from '@mui/material';\nimport LockIcon from '@mui/icons-material/Lock';\nimport makeStyles from '@mui/styles/makeStyles';\nimport SignupForm from './SignupForm';\nimport LoginForm from './LoginForm';\nimport NewPasswordForm from './NewPasswordForm';\nimport ResetPasswordForm from './ResetPasswordForm';\nimport SimpleBox from './SimpleBox';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(() => ({\n switch: {\n marginBottom: '1em',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center'\n }\n}));\n\n/**\n * @param {object} props Props\n * @param {boolean} props.hasSignup If to show signup form.\n * @param {boolean} props.allowUsername Indicates, if login is allowed with username (instead of email).\n * @param {string} props.postSignupRedirect Location to redirect to after signup.\n * @param {string} props.postLoginRedirect Location to redirect to after login.\n * @param {object} props.additionalSignupValues\n * @param {object} props.passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst LocalLoginPage = ({\n hasSignup,\n allowUsername,\n postSignupRedirect,\n postLoginRedirect,\n additionalSignupValues,\n passwordScorer = defaultScorer\n}) => {\n const classes = useStyles();\n const navigate = useNavigate();\n const translate = useTranslate();\n const [searchParams] = useSearchParams();\n const isSignup = hasSignup && searchParams.has('signup');\n const isResetPassword = searchParams.has('reset_password');\n const isNewPassword = searchParams.has('new_password');\n const isLogin = !isSignup && !isResetPassword && !isNewPassword;\n const redirectTo = searchParams.get('redirect');\n const { identity, isLoading } = useGetIdentity();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n if (postLoginRedirect) {\n navigate(`${postLoginRedirect}?${getSearchParamsRest(searchParams)}`);\n } else if (redirectTo && redirectTo.startsWith('http')) {\n window.location.href = redirectTo;\n } else {\n navigate(redirectTo || '/');\n }\n }\n }, [identity, isLoading, navigate, searchParams, redirectTo, postLoginRedirect]);\n\n const [title, text] = useMemo(() => {\n if (isSignup) {\n return ['auth.action.signup', 'auth.helper.signup'];\n }\n if (isLogin) {\n return ['auth.action.login', 'auth.helper.login'];\n }\n if (isResetPassword) {\n return ['auth.action.reset_password', 'auth.helper.reset_password'];\n }\n if (isNewPassword) {\n return ['auth.action.set_new_password', 'auth.helper.set_new_password'];\n }\n }, [isSignup, isLogin, isResetPassword, isNewPassword]);\n\n if (isLoading || identity?.id) return null;\n\n return (\n }>\n \n {isSignup && (\n \n )}\n {isResetPassword && }\n {isNewPassword && }\n {isLogin && }\n
\n {isSignup && (\n \n {translate('auth.action.login')}\n \n )}\n {isLogin && (\n <>\n {hasSignup && (\n
\n \n {translate('auth.action.signup')}\n \n
\n )}\n
\n \n {translate('auth.action.reset_password')}\n \n
\n \n )}\n
\n
\n
\n );\n};\n\nLocalLoginPage.defaultProps = {\n hasSignup: true,\n allowUsername: false,\n additionalSignupValues: {}\n};\n\nexport default LocalLoginPage;\n","import * as React from 'react';\nimport createSlug from 'speakingurl';\nimport {\n Form,\n useTranslate,\n useNotify,\n useSafeSetState,\n TextInput,\n minLength,\n required,\n email,\n useLocaleState\n} from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport useSignup from '../../hooks/useSignup';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: 450\n },\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\n/**\n * @param postSignupRedirect\n * @param additionalSignupValues\n * @param delayBeforeRedirect\n * @param {string} redirectTo\n * @param {object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst SignupForm = ({\n passwordScorer = defaultScorer,\n postSignupRedirect,\n additionalSignupValues,\n delayBeforeRedirect\n}) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const [searchParams] = useSearchParams();\n const interactionId = searchParams.get('interaction_id');\n const redirectTo = searchParams.get('redirect');\n const [locale] = useLocaleState();\n const [password, setPassword] = React.useState('');\n\n const submit = values => {\n setLoading(true);\n signup({\n ...values,\n interactionId,\n ...additionalSignupValues\n })\n .then(() => {\n if (delayBeforeRedirect) {\n setTimeout(() => {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = postSignupRedirect\n ? `${postSignupRedirect}?${getSearchParamsRest(searchParams)}`\n : redirectTo || '/';\n setLoading(false);\n }, delayBeforeRedirect);\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = postSignupRedirect\n ? `${postSignupRedirect}?${getSearchParamsRest(searchParams)}`\n : redirectTo || '/';\n setLoading(false);\n }\n notify('auth.message.new_user_created', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'warning',\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n });\n };\n\n return (\n
\n \n \n value\n ? createSlug(value, {\n lang: locale || 'fr',\n separator: '_',\n custom: ['.', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n })\n : ''\n }\n />\n \n {passwordScorer && password && !(searchParams.has('email') && searchParams.has('force-email')) && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n \n \n )}\n setPassword(e.target.value)}\n label={translate('ra.auth.password')}\n autoComplete=\"new-password\"\n fullWidth\n disabled={loading || (searchParams.has('email') && searchParams.has('force-email'))}\n validate={[required(), validatePasswordStrength(passwordScorer)]}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.signup')\n )}\n \n \n
\n );\n};\n\nSignupForm.defaultValues = {\n redirectTo: '/',\n additionalSignupValues: {}\n};\n\nexport default SignupForm;\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import { defaultScorer } from '../../passwordScorer';\n\nconst validatePasswordStrength = (scorer = defaultScorer) => value => {\n if (!scorer) return undefined;\n const strength = scorer.scoreFn(value);\n if (strength < scorer.minRequiredScore) {\n return 'auth.input.password_too_weak';\n }\n return undefined;\n};\n\nexport default validatePasswordStrength;\n","// Inspired by https://github.com/bartlomiejzuber/password-strength-score\n\n/**\n * @typedef PasswordStrengthOptions\n * @property {number} isVeryLongLength - Required characters for a very long password (default: 12)\n * @property {number} isLongLength - Required characters for a long password (default: 6)\n * @property {number} isVeryLongScore - Score for a very long password (default: 2.5)\n * @property {number} isLongScore - Score for a long password (default: 1.5)\n * @property {number} uppercaseScore - Score for a password with uppercase letters (default: 1)\n * @property {number} lowercaseScore - Score for a password with lowercase letters (default: 1)\n * @property {number} numbersScore - Score for a password with numbers (default: 1)\n * @property {number} nonAlphanumericsScore - Score for a password without non-alphanumeric characters (default: 1)\n */\n\n/** @type {PasswordStrengthOptions} */\nexport const defaultOptions = {\n isVeryLongLength: 14,\n isLongLength: 8,\n isLongScore: 2,\n isVeryLongScore: 4,\n uppercaseScore: 1,\n lowercaseScore: 1,\n numbersScore: 1,\n nonAlphanumericsScore: 1\n};\n\n/**\n *\n * @param {string} password Password text.\n * @param {PasswordStrengthOptions} options Password options.\n * @returns {number} The password strength score.\n */\nexport const passwordStrength = (password, options) => {\n if (!password) {\n return 0;\n }\n\n const mergedOptions = { ...defaultOptions, ...options };\n\n const longScore = (password.length >= mergedOptions.isLongLength && mergedOptions.isLongScore) || 0;\n const veryLongScore = (password.length >= mergedOptions.isVeryLongLength && mergedOptions.isVeryLongScore) || 0;\n const lowercaseScore = (/[a-z]/.test(password) && mergedOptions.lowercaseScore) || 0;\n const uppercaseScore = (/[A-Z]/.test(password) && mergedOptions.uppercaseScore) || 0;\n const numbersScore = (/\\d/.test(password) && mergedOptions.numbersScore) || 0;\n const nonalphasScore = (/\\W/.test(password) && mergedOptions.nonAlphanumericsScore) || 0;\n\n return uppercaseScore + lowercaseScore + numbersScore + nonalphasScore + longScore + veryLongScore;\n};\n\nexport const createPasswordScorer = (options = defaultOptions, minRequiredScore = 5) => {\n const mergedOptions = { ...defaultOptions, ...options };\n\n return {\n scoreFn: password => passwordStrength(password, mergedOptions),\n minRequiredScore,\n maxScore:\n mergedOptions.uppercaseScore +\n mergedOptions.lowercaseScore +\n mergedOptions.numbersScore +\n mergedOptions.nonAlphanumericsScore +\n mergedOptions.isLongScore +\n mergedOptions.isVeryLongScore\n };\n};\n\nexport const defaultScorer = createPasswordScorer(defaultOptions, 5);\n","import React from 'react';\nimport ColorGradientProgressBar from './ColorGradientProgressBar';\nimport { defaultScorer } from '../../passwordScorer';\n\nexport default function PasswordStrengthIndicator({ scorer = defaultScorer, password, ...restProps }) {\n const strength = scorer.scoreFn(password);\n return ;\n}\n","import React from 'react';\nimport { LinearProgress } from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\n/**\n * @typedef {object} Color\n * @property {number} red\n * @property {number} green\n * @property {number} blue\n */\n\n/**\n * Calculate a rgb-color from a gradient between `color1` and `color2`\n * @param {number} fade - Indicates the fade between `color1` and `color2` in the range [0, 1].\n * @param {Color} color1\n * @param {Color} color2\n * @returns {string} `` `rgb(${red}, ${green}, ${blue})` ``\n */\nconst colorGradient = (fade, color1, color2) => {\n const diffRed = color2.red - color1.red;\n const diffGreen = color2.green - color1.green;\n const diffBlue = color2.blue - color1.blue;\n\n const gradient = {\n red: Math.floor(color1.red + diffRed * fade),\n green: Math.floor(color1.green + diffGreen * fade),\n blue: Math.floor(color1.blue + diffBlue * fade)\n };\n\n return `rgb(${gradient.red},${gradient.green},${gradient.blue})`;\n};\n\n/**\n * A progress bar that changes its color between its min an max value.\n * @param {object} props\n * @param {Color} [props.badColor] - default: `#FF4047`\n * @param {Color} [props.goodColor] - default: `#00FF6E`\n * @param {number} props.maxVal\n * @param {number} props.minVal\n * @param {number} props.currentVal\n */\nexport default function ColorGradientProgressBar(props) {\n const { minVal, maxVal, currentVal, badColor, goodColor, ...restProps } = props;\n\n const color1 = badColor || { red: 0xff, green: 0x40, blue: 0x47 };\n const color2 = goodColor || { red: 0x00, green: 0xff, blue: 0x6e };\n\n const fade = Math.max(0, Math.min(1, (currentVal - minVal) / (maxVal - minVal)));\n const currentColor = colorGradient(fade, color1, color2);\n\n const StyledLinearProgress = withStyles({\n colorPrimary: {\n backgroundColor: 'black' // '#e0e0e0'\n },\n barColorPrimary: {\n backgroundColor: currentColor\n }\n })(LinearProgress);\n\n return ;\n}\n","const USED_SEARCH_PARAMS = ['signup', 'reset_password', 'new_password', 'email', 'force-email'];\n\nconst getSearchParamsRest = searchParams => {\n const rest = [];\n for (const [key, value] of searchParams.entries()) {\n if (!USED_SEARCH_PARAMS.includes(key)) {\n rest.push(`${key}=${encodeURIComponent(value)}`);\n }\n }\n return rest.length > 0 ? rest.join('&') : '';\n};\n\nexport default getSearchParamsRest;\n","import * as React from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, TextInput, required, email, useLogin } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: 450\n },\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\nconst LoginForm = ({ postLoginRedirect, allowUsername }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const login = useLogin();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const redirectTo = postLoginRedirect\n ? `${postLoginRedirect}?${getSearchParamsRest(searchParams)}`\n : searchParams.get('redirect');\n const interactionId = searchParams.get('interaction_id');\n\n const submit = values => {\n setLoading(true);\n login({ ...values, redirectTo, interactionId })\n .then(() => {\n setLoading(false);\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n validate={allowUsername ? [required()] : [required(), email()]}\n />\n \n \n {loading ? (\n \n ) : (\n translate('auth.action.login')\n )}\n \n \n
\n );\n};\n\nLoginForm.defaultValues = {\n redirectTo: '/',\n allowUsername: false\n};\n\nexport default LoginForm;\n","import React, { useState } from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport { defaultScorer } from '../../passwordScorer';\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\n/**\n *\n * @param {string} redirectTo\n * @param {Object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }) => {\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const token = searchParams.get('token');\n\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n\n const [newPassword, setNewPassword] = useState('');\n\n const submit = values => {\n setLoading(true);\n authProvider\n .setNewPassword({ ...values, token })\n .then(res => {\n setTimeout(() => {\n window.location.href = `/login${redirectTo ? `?redirect=${encodeURIComponent(redirectTo)}` : ''}`;\n setLoading(false);\n }, 2000);\n notify('auth.notification.password_changed', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n {passwordScorer && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n\n \n \n )}\n setNewPassword(e.target.value)}\n format={value => (value ? value.toLowerCase() : '')}\n />\n (value ? value.toLowerCase() : '')}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.set_new_password')\n )}\n \n \n
\n );\n};\n\nexport default NewPasswordForm;\n","import React from 'react';\nimport { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin';\nimport { Button, CardContent, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\nconst ResetPasswordForm = () => {\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n\n const submit = values => {\n setLoading(true);\n authProvider\n .resetPassword({ ...values })\n .then(res => {\n setLoading(false);\n notify('auth.notification.reset_password_submitted', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.reset_password')\n )}\n \n \n
\n );\n};\n\nexport default ResetPasswordForm;\n","import React from 'react';\nimport { Box, Card, Typography } from '@mui/material';\nimport { Notification } from 'react-admin';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.secondary.main\n }\n },\n root: {\n backgroundColor: theme.palette.secondary.main\n },\n card: {\n minWidth: 300,\n maxWidth: 500,\n marginTop: '6em',\n [theme.breakpoints.down('sm')]: {\n margin: '1em'\n }\n },\n icon: {\n marginTop: 5,\n marginRight: 5\n },\n title: {\n [theme.breakpoints.down('sm')]: {\n fontWeight: 'bold',\n marginTop: 12\n }\n }\n}));\n\nconst SimpleBox = ({ title, icon, text, children }) => {\n const classes = useStyles();\n return (\n \n \n \n {icon && React.cloneElement(icon, { fontSize: 'large', className: classes.icon })}\n \n {title}\n \n \n \n {text}\n \n {children}\n \n \n \n );\n};\n\nexport default SimpleBox;\n","import React from 'react';\nimport { Resource, usePermissions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport { rightsToCreate } from '../constants';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissions(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef, useCallback } from 'react';\nimport { Logout, UserMenu as RaUserMenu, useGetIdentity, useTranslate, useUserMenu } from 'react-admin';\nimport { MenuItem, ListItemIcon, ListItemText } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useNavigate } from 'react-router-dom';\n\n// It's important to pass the ref to allow Material UI to manage the keyboard navigation\nconst UserMenuItem = forwardRef(({ label, icon, to, ...rest }, ref) => {\n const { onClose } = useUserMenu();\n const translate = useTranslate();\n const navigate = useNavigate();\n const onClick = useCallback(() => {\n navigate(to);\n onClose();\n }, [to, onClose, navigate]);\n return (\n \n {icon && {React.cloneElement(icon, { fontSize: 'small' })}}\n {translate(label)}\n \n );\n});\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { identity } = useGetIdentity();\n return (\n \n {identity && identity.id !== ''\n ? [\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}/show`}\n />,\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}`}\n />,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n logout: ,\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import React, { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = message => {\n const { identity, isLoading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!isLoading && !identity?.id) {\n notify(message || 'ra.auth.auth_check_error', { type: 'error' });\n redirect(`/login?redirect=${encodeURIComponent(location.pathname + location.search)}`);\n }\n }, [isLoading, identity, redirect, notify, location]);\n\n return { identity, isLoading };\n};\n\nexport default useCheckAuthenticated;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n permissions: 'Permissions',\n signup: 'Signup',\n reset_password: 'Reset password',\n set_new_password: 'Set new password',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address',\n current_password: 'Current password',\n new_password: 'New password',\n confirm_new_password: 'Confirm new password',\n password_strength: 'Password strength',\n password_too_weak: 'Password too weak. Increase length or add special characters.'\n },\n helper: {\n login: 'Sign in to your account',\n signup: 'Create your account',\n reset_password: 'Enter your email address below and we will send you a link to reset your password',\n set_new_password: 'Please enter your email address and a new password below'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n unable_to_fetch_user_data: 'Unable to fetch user data',\n no_token_returned: 'No token returned',\n invalid_token_returned: 'Invalid token returned',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider:\n 'Please choose a POD provider in the list below. All application data will be saved on your POD.'\n },\n notification: {\n reset_password_submitted: 'An email has been sent with reset password instructions',\n reset_password_error: 'An error occurred',\n password_changed: 'Password changed successfully',\n new_password_error: 'An error occurred',\n invalid_password: 'Invalid password',\n get_settings_error: 'An error occurred',\n update_settings_error: 'An error occurred'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la ressource',\n login_required: 'Connexion requise'\n },\n action: {\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n reset_password: 'Mot de passe oublié ?',\n set_new_password: 'Définir le mot de passe',\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail',\n current_password: 'Mot de passe actuel',\n new_password: 'Nouveau mot de passe',\n confirm_new_password: 'Confirmer le nouveau mot de passe',\n password_strength: 'Force du mot de passe',\n password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.'\n },\n helper: {\n login: 'Connectez-vous à votre compte.',\n signup: 'Créez votre compte',\n reset_password:\n 'Entrez votre adresse mail ci-dessous et nous vous enverrons un lien pour réinitialiser votre mot de passe',\n set_new_password: 'Veuillez entrer votre adresse mail et un nouveau mot de passe ci-dessous'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n unable_to_fetch_user_data: 'Impossible de récupérer les données du profil',\n no_token_returned: 'Aucun token a été retourné',\n invalid_token_returned: 'Token invalide',\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider:\n \"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD.\"\n },\n notification: {\n reset_password_submitted: 'Un e-mail a été envoyé avec les instructions de réinitialisation du mot de passe',\n reset_password_error: \"Une erreur s'est produite\",\n password_changed: 'Le mot de passe a été changé avec succès',\n new_password_error: \"Une erreur s'est produite\",\n invalid_password: 'Mot de passe incorrect',\n get_settings_error: \"Une erreur s'est produite\",\n update_settings_error: \"Une erreur s'est produite\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":[],"version":3,"file":"index.cjs.js.map"} \ No newline at end of file +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEEO,MAAM,4CAAiB,CAAA,QAAU,CAAC,QAAQ,YAAY,MAAM,OAAO,CAAC,SAAS,QAAQ;QAAC;KAAM;AAI5F,MAAM,4CAAY,CAAA;IACvB,MAAM,YAAY,IAAI,IAAI;IAC1B,OAAO,CAAA,GAAA,wCAAM,EAAE,UAAU,MAAM,EAAE,QAAQ,UAAU,QAAQ;AAC7D;AAEO,MAAM,4CAAgB,CAAA,UAAY,CAAA;QACvC,SAAS;QACT,KA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M;YACN,UAAU;YACV,OAAO;YACP,mBAAmB;YACnB,kBAAkB;YAClB,cAAc;YACd,sBAAsB;YACtB,mBAAmB;YACnB,mBAAmB;QACrB;QACA,QAAQ;YACN,OAAO;YACP,QAAQ;YACR,gBACE;YACF,kBAAkB;QACpB;QACA,SAAS;YACP,yBAAyB;YACzB,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,4BAA4B;YAC5B,0BAA0B;YAC1B,2BAA2B;YAC3B,mBAAmB;YACnB,wBAAwB;YACxB,2BAA2B;YAC3B,sBAAsB;YACtB,kBAAkB;YAClB,gBAAgB;YAChB,kBACE;YACF,kBAAkB;YAClB,gBAAgB;YAChB,mBAAmB;YACnB,aAAa;YACb,0BAA0B;YAC1B,mBAAmB;YACnB,qBACE;QACJ;QACA,cAAc;YACZ,0BAA0B;YAC1B,sBAAsB;YACtB,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;QACzB;IACF;AACF;IAEA,2CAAe;","sources":["packages/auth-provider/src/index.ts","packages/auth-provider/src/authProvider.js","packages/auth-provider/src/utils.js","packages/auth-provider/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/hooks/useCheckPermissions.js","packages/auth-provider/src/constants.js","packages/auth-provider/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/crud/edit/EditActionsWithPermissions.js","packages/auth-provider/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/hooks/useAgents.js","packages/auth-provider/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/crud/show/ShowActionsWithPermissions.js","packages/auth-provider/src/components/AuthDialog.js","packages/auth-provider/src/components/SsoLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/SignupForm.js","packages/auth-provider/src/hooks/useSignup.js","packages/auth-provider/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/passwordScorer.js","packages/auth-provider/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/components/LocalLoginPage/LoginForm.js","packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/components/ResourceWithPermissions.js","packages/auth-provider/src/components/UserMenu.js","packages/auth-provider/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/messages/english.js","packages/auth-provider/src/messages/french.js"],"sourcesContent":["export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport * as oauth from 'oauth4webapi';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl, delay } from './utils';\n\nconst AUTH_TYPE_SSO = 'sso';\nconst AUTH_TYPE_LOCAL = 'local';\nconst AUTH_TYPE_POD = 'pod';\nconst AUTH_TYPE_SOLID_OIDC = 'solid-oidc';\n\nconst authProvider = ({\n dataProvider,\n authType,\n allowAnonymous = true,\n checkUser,\n checkPermissions = false,\n clientId\n}) => {\n if (![AUTH_TYPE_SSO, AUTH_TYPE_LOCAL, AUTH_TYPE_POD, AUTH_TYPE_SOLID_OIDC].includes(authType))\n throw new Error('The authType parameter is missing from the auth provider');\n if (authType === AUTH_TYPE_SOLID_OIDC && !clientId)\n throw new Error('The clientId parameter is required for solid-oidc authentication');\n return {\n login: async params => {\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const { webId, issuer } = params;\n\n if (webId && !issuer) {\n // TODO find issuer from webId\n }\n\n const as = await oauth\n .discoveryRequest(new URL(issuer))\n .then(response => oauth.processDiscoveryResponse(new URL(issuer), response));\n\n const codeVerifier = oauth.generateRandomCodeVerifier();\n const codeChallenge = await oauth.calculatePKCECodeChallenge(codeVerifier);\n const codeChallengeMethod = 'S256';\n\n // Save to use on handleCallback method\n localStorage.setItem('code_verifier', codeVerifier);\n\n const authorizationUrl = new URL(as.authorization_endpoint);\n authorizationUrl.searchParams.set('response_type', 'code');\n authorizationUrl.searchParams.set('client_id', clientId);\n authorizationUrl.searchParams.set('code_challenge', codeChallenge);\n authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);\n authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);\n authorizationUrl.searchParams.set('scope', 'openid webid offline_access');\n\n window.location = authorizationUrl;\n } else if (authType === AUTH_TYPE_LOCAL) {\n const { username, password, interactionId, redirectTo } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n password: password.trim(),\n interactionId\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n if (redirectTo) {\n if (interactionId) await delay(3000); // Ensure the interactionId has been received and processed\n window.location.href = redirectTo;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n }\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n } else if (authType === AUTH_TYPE_SSO) {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n if (params.redirect) redirectUrl += `&redirect=${encodeURIComponent(params.redirect)}`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n handleCallback: async () => {\n const { searchParams } = new URL(window.location);\n\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const issuer = new URL(searchParams.get('iss'));\n const as = await oauth\n .discoveryRequest(issuer)\n .then(response => oauth.processDiscoveryResponse(issuer, response));\n\n const client = {\n client_id: clientId,\n token_endpoint_auth_method: 'none' // We don't have a client secret\n };\n\n const currentUrl = new URL(window.location.href);\n const params = oauth.validateAuthResponse(as, client, currentUrl, oauth.expectNoState);\n if (oauth.isOAuth2Error(params)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Retrieve code verifier set during login\n const codeVerifier = localStorage.getItem('code_verifier');\n\n const response = await oauth.authorizationCodeGrantRequest(\n as,\n client,\n params,\n `${window.location.origin}/auth-callback`,\n codeVerifier\n );\n\n const result = await oauth.processAuthorizationCodeOpenIDResponse(as, client, response);\n if (oauth.isOAuth2Error(result)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Until DPoP is implemented, use the ID token to log into local Pod\n // And the proxy endpoint to log into remote Pods\n localStorage.setItem('token', result.id_token);\n\n // Remove code verifier now we don't need it anymore\n localStorage.removeItem('code_verifier');\n\n // Reload to ensure the dataServer config is reset\n window.location.href = '/';\n } else {\n const token = searchParams.get('token');\n if (!token) throw new Error('auth.message.no_token_returned');\n\n let webId;\n try {\n ({ webId } = jwtDecode(token));\n } catch (e) {\n throw new Error('auth.message.invalid_token_returned');\n }\n const { json } = await dataProvider.fetch(webId);\n\n if (!json) throw new Error('auth.message.unable_to_fetch_user_data');\n\n if (checkUser && !checkUser(json)) throw new Error('auth.message.user_not_allowed_to_login');\n\n localStorage.setItem('token', token);\n\n // Reload to ensure the dataServer config is reset\n window.location.href = '/';\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (authType === AUTH_TYPE_LOCAL) {\n const { username, email, password, domain, interactionId, ...profileData } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n email: email.trim(),\n password: password.trim(),\n interactionId,\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n const { webId } = jwtDecode(token);\n return webId;\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error(e.message || 'ra.auth.sign_in_error');\n }\n }\n } else {\n const redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n logout: async () => {\n switch (authType) {\n case AUTH_TYPE_LOCAL: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n let result = {};\n\n try {\n result = await dataProvider.fetch(urlJoin(authServerUrl, '.well-known/openid-configuration'));\n } catch (e) {\n // Do nothing if it fails\n }\n\n if (result.status === 200 && result.json) {\n // Redirect to OIDC endpoint if it exists\n window.location.href = result.json.end_session_endpoint;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n }\n\n break;\n }\n\n case AUTH_TYPE_SSO: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n const baseUrl = new URL(window.location.href).origin;\n return urlJoin(\n authServerUrl,\n `auth/logout?redirectUrl=${encodeURIComponent(`${urlJoin(baseUrl, 'login')}?logout=true`)}`\n );\n }\n\n case AUTH_TYPE_POD: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n // Delete token but also any other value in local storage\n localStorage.clear();\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://activitypods.org/ns/core#FrontAppRegistration'\n )}`;\n }\n break;\n }\n\n case AUTH_TYPE_SOLID_OIDC: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webid: webId } = jwtDecode(token); // Not webId !!\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://www.w3.org/ns/solid/interop#ApplicationRegistration'\n )}`;\n }\n break;\n }\n\n default:\n break;\n }\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n }\n return true;\n },\n checkError: error => Promise.resolve(),\n getPermissions: async uri => {\n if (!checkPermissions) return;\n\n // React-admin calls getPermissions with an empty object on every page refresh\n // It also passes an object `{ params: { route: 'dashboard' } }` on the Dashboard\n // Ignore all this until we found a way to bypass these redundant calls\n if (typeof uri === 'object') return;\n\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch (e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const authorization = {\n '@id': `#${mode.replace('acl:', '')}`,\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n const { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const payload = jwtDecode(token);\n const webId = payload.webId || payload.webid; // Currently we must deal with both formats\n\n if (!webId) throw new Error('No webId found on provided token !');\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName:\n profileData?.['vcard:given-name'] ||\n profileData?.['pair:label'] ||\n webIdData['foaf:name'] ||\n webIdData['pair:label'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('auth.notification.reset_password_error');\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('auth.notification.new_password_error');\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('auth.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({\n currentPassword,\n email: email?.trim(),\n newPassword\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('auth.notification.invalid_password');\n }\n\n throw new Error('auth.notification.update_settings_error');\n }\n }\n };\n};\n\nexport default authProvider;\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a POD, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? new URL(authServer.baseUrl).origin : authServer.baseUrl;\n};\n\nexport const delay = async t => new Promise(resolve => setTimeout(resolve, t));\n","import React from 'react';\nimport { Create, CreateActions, useResourceContext } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const resource = useResourceContext();\n const createContainerUri = useCreateContainer(resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import React, { useEffect } from 'react';\nimport { usePermissions, useRedirect, useNotify, useGetIdentity } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\n\nconst useCheckPermissions = (uri, mode, redirectUrl = '/') => {\n const { identity, isLoading } = useGetIdentity();\n const { permissions } = usePermissions(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (!isLoading && identity && permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], { type: 'error' });\n redirect(redirectUrl);\n }\n }, [permissions, identity, redirect, notify, isLoading]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","export const ACL_READ = 'acl:Read';\nexport const ACL_APPEND = 'acl:Append';\nexport const ACL_WRITE = 'acl:Write';\nexport const ACL_CONTROL = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React from 'react';\nimport { Edit, useGetRecordId } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport {\n usePermissionsOptimized,\n ShowButton,\n ListButton,\n TopToolbar,\n useResourceDefinition,\n useRecordContext\n} from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl } from '../../constants';\n\nconst EditActionsWithPermissions = () => {\n const { hasList, hasShow } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasShow && }\n {!!permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React, { useState } from 'react';\nimport { Button, useRecordContext, useResourceContext } from 'react-admin';\nimport ShareIcon from '@mui/icons-material/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ isContainer }) => {\n const record = useRecordContext();\n const resource = useResourceContext();\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nPermissionsButton.defaultProps = {\n isContainer: false\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport PersonIcon from '@mui/icons-material/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { data } = useGetList(\n 'Person',\n {\n pagination: { page: 1, perPage: 100 },\n sort: { field: 'pair:label', order: 'ASC' },\n filter: { q: inputValue }\n },\n {\n enabled: inputValue.length > 0\n }\n );\n\n useEffect(() => {\n setOptions(data?.length > 0 ? Object.values(data) : []);\n }, [data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={(props, option) => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport { List } from '@mui/material';\nimport { styled } from '@mui/system';\nimport AgentItem from './AgentItem';\n\nconst StyledList = styled(List)(({ theme }) => ({\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport EditIcon from '@mui/icons-material/Edit';\nimport CheckIcon from '@mui/icons-material/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport PublicIcon from '@mui/icons-material/Public';\nimport VpnLockIcon from '@mui/icons-material/VpnLock';\nimport PersonIcon from '@mui/icons-material/Person';\nimport GroupIcon from '@mui/icons-material/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error(`Unknown agent predicate: ${agent.predicate}`);\n }\n};\n\nexport default AgentIcon;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissions, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissions(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n const result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (const p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { SaveButton, Toolbar, ToolbarProps } from 'react-admin';\nimport { styled } from '@mui/material/styles';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst StyledToolbar = styled(Toolbar)(() => ({\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n}));\n\nconst EditToolbarWithPermissions: React.FunctionComponent = props => (\n \n \n \n \n);\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { EditButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToEdit } from '../../constants';\n\nconst EditButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToEdit.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default EditButtonWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport {\n CreateButton,\n ExportButton,\n useResourceDefinition,\n TopToolbar,\n usePermissions,\n useResourceContext\n} from 'react-admin';\nimport { useMediaQuery } from '@mui/material';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n sort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n selectedIds,\n showFilter,\n total\n}) => {\n const resource = useResourceContext();\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition();\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissions(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n filterValues,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { Show, useGetRecordId } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'show');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport {\n EditButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext\n} from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit } from '../../constants';\n\nconst ShowActionsWithPermissions = () => {\n const { hasList, hasEdit } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n return (\n \n {hasList && }\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useRef, useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useDataProvider, useAuthProvider, useLogin, useGetIdentity, useNotify } from 'react-admin';\nimport { Card, Avatar, Typography, Button, CardActions } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport LockIcon from '@mui/icons-material/Lock';\n\nconst delay = async t => new Promise(resolve => setTimeout(resolve, t));\n\n// Inspired from https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/auth/Login.tsx\nconst SsoLoginPage = ({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }) => {\n const containerRef = useRef();\n let backgroundImageLoaded = false;\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { identity, isLoading } = useGetIdentity();\n\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n // Already authenticated, redirect to the home page\n navigate(searchParams.get('redirect') || '/');\n }\n }, [identity, isLoading, navigate, searchParams]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', { type: 'error' });\n } else {\n notify('auth.message.bad_request', { type: 'error', messageArgs: { error: searchParams.get('error') } });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n localStorage.setItem('token', token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n localStorage.removeItem('token');\n notify('auth.message.user_not_allowed_to_login', { type: 'error' });\n navigate.replace('/login');\n } else if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = searchParams.get('redirect');\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', { type: 'info' });\n window.location.href = `/${userResource}/${encodeURIComponent(webId)}`;\n } else {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = '/';\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', { type: 'info' });\n navigate('/');\n }\n })();\n }, [searchParams, navigate, notify, userResource]);\n\n const updateBackgroundImage = () => {\n if (!backgroundImageLoaded && containerRef.current) {\n containerRef.current.style.backgroundImage = `url(${backgroundImage})`;\n backgroundImageLoaded = true;\n }\n };\n\n // Load background image asynchronously to speed up time to interactive\n const lazyLoadBackgroundImage = () => {\n if (backgroundImage) {\n const img = new Image();\n img.onload = updateBackgroundImage;\n img.src = backgroundImage;\n }\n };\n\n useEffect(() => {\n if (!backgroundImageLoaded) {\n lazyLoadBackgroundImage();\n }\n });\n\n if (isLoading) return null;\n\n return (\n \n \n
\n \n \n \n
\n {text && {text}}\n {buttons?.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n );\n};\n\nconst PREFIX = 'SsoLoginPage';\n\nexport const SsoLoginPageClasses = {\n card: `${PREFIX}-card`,\n avatar: `${PREFIX}-avatar`,\n icon: `${PREFIX}-icon`,\n switch: `${PREFIX}-switch`\n};\n\nconst Root = styled('div', {\n name: PREFIX,\n overridesResolver: (props, styles) => styles.root\n})(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',\n [`& .${SsoLoginPageClasses.card}`]: {\n minWidth: 300,\n marginTop: '6em'\n },\n [`& .${SsoLoginPageClasses.avatar}`]: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n [`& .${SsoLoginPageClasses.icon}`]: {\n backgroundColor: theme.palette.secondary[500]\n },\n [`& .${SsoLoginPageClasses.switch}`]: {\n marginBottom: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import React, { useEffect, useMemo } from 'react';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport { useTranslate, useGetIdentity } from 'react-admin';\nimport { Card, Typography } from '@mui/material';\nimport LockIcon from '@mui/icons-material/Lock';\nimport makeStyles from '@mui/styles/makeStyles';\nimport SignupForm from './SignupForm';\nimport LoginForm from './LoginForm';\nimport NewPasswordForm from './NewPasswordForm';\nimport ResetPasswordForm from './ResetPasswordForm';\nimport SimpleBox from './SimpleBox';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(() => ({\n switch: {\n marginBottom: '1em',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center'\n }\n}));\n\n/**\n * @param {object} props Props\n * @param {boolean} props.hasSignup If to show signup form.\n * @param {boolean} props.allowUsername Indicates, if login is allowed with username (instead of email).\n * @param {string} props.postSignupRedirect Location to redirect to after signup.\n * @param {string} props.postLoginRedirect Location to redirect to after login.\n * @param {object} props.additionalSignupValues\n * @param {object} props.passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst LocalLoginPage = ({\n hasSignup,\n allowUsername,\n postSignupRedirect,\n postLoginRedirect,\n additionalSignupValues,\n passwordScorer = defaultScorer\n}) => {\n const classes = useStyles();\n const navigate = useNavigate();\n const translate = useTranslate();\n const [searchParams] = useSearchParams();\n const isSignup = hasSignup && searchParams.has('signup');\n const isResetPassword = searchParams.has('reset_password');\n const isNewPassword = searchParams.has('new_password');\n const isLogin = !isSignup && !isResetPassword && !isNewPassword;\n const redirectTo = searchParams.get('redirect');\n const { identity, isLoading } = useGetIdentity();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n if (postLoginRedirect) {\n navigate(`${postLoginRedirect}?${getSearchParamsRest(searchParams)}`);\n } else if (redirectTo && redirectTo.startsWith('http')) {\n window.location.href = redirectTo;\n } else {\n navigate(redirectTo || '/');\n }\n }\n }, [identity, isLoading, navigate, searchParams, redirectTo, postLoginRedirect]);\n\n const [title, text] = useMemo(() => {\n if (isSignup) {\n return ['auth.action.signup', 'auth.helper.signup'];\n }\n if (isLogin) {\n return ['auth.action.login', 'auth.helper.login'];\n }\n if (isResetPassword) {\n return ['auth.action.reset_password', 'auth.helper.reset_password'];\n }\n if (isNewPassword) {\n return ['auth.action.set_new_password', 'auth.helper.set_new_password'];\n }\n }, [isSignup, isLogin, isResetPassword, isNewPassword]);\n\n if (isLoading || identity?.id) return null;\n\n return (\n }>\n \n {isSignup && (\n \n )}\n {isResetPassword && }\n {isNewPassword && }\n {isLogin && }\n
\n {isSignup && (\n \n {translate('auth.action.login')}\n \n )}\n {isLogin && (\n <>\n {hasSignup && (\n
\n \n {translate('auth.action.signup')}\n \n
\n )}\n
\n \n {translate('auth.action.reset_password')}\n \n
\n \n )}\n
\n
\n
\n );\n};\n\nLocalLoginPage.defaultProps = {\n hasSignup: true,\n allowUsername: false,\n additionalSignupValues: {}\n};\n\nexport default LocalLoginPage;\n","import * as React from 'react';\nimport createSlug from 'speakingurl';\nimport {\n Form,\n useTranslate,\n useNotify,\n useSafeSetState,\n TextInput,\n minLength,\n required,\n email,\n useLocaleState\n} from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport useSignup from '../../hooks/useSignup';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: 450\n },\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\n/**\n * @param postSignupRedirect\n * @param additionalSignupValues\n * @param delayBeforeRedirect\n * @param {string} redirectTo\n * @param {object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst SignupForm = ({\n passwordScorer = defaultScorer,\n postSignupRedirect,\n additionalSignupValues,\n delayBeforeRedirect\n}) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const [searchParams] = useSearchParams();\n const interactionId = searchParams.get('interaction_id');\n const redirectTo = searchParams.get('redirect');\n const [locale] = useLocaleState();\n const [password, setPassword] = React.useState('');\n\n const submit = values => {\n setLoading(true);\n signup({\n ...values,\n interactionId,\n ...additionalSignupValues\n })\n .then(() => {\n if (delayBeforeRedirect) {\n setTimeout(() => {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = postSignupRedirect\n ? `${postSignupRedirect}?${getSearchParamsRest(searchParams)}`\n : redirectTo || '/';\n setLoading(false);\n }, delayBeforeRedirect);\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = postSignupRedirect\n ? `${postSignupRedirect}?${getSearchParamsRest(searchParams)}`\n : redirectTo || '/';\n setLoading(false);\n }\n notify('auth.message.new_user_created', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'warning',\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n });\n };\n\n return (\n
\n \n \n value\n ? createSlug(value, {\n lang: locale || 'fr',\n separator: '_',\n custom: ['.', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n })\n : ''\n }\n />\n \n {passwordScorer && password && !(searchParams.has('email') && searchParams.has('force-email')) && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n \n \n )}\n setPassword(e.target.value)}\n label={translate('ra.auth.password')}\n autoComplete=\"new-password\"\n fullWidth\n disabled={loading || (searchParams.has('email') && searchParams.has('force-email'))}\n validate={[required(), validatePasswordStrength(passwordScorer)]}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.signup')\n )}\n \n \n
\n );\n};\n\nSignupForm.defaultValues = {\n redirectTo: '/',\n additionalSignupValues: {}\n};\n\nexport default SignupForm;\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import { defaultScorer } from '../../passwordScorer';\n\nconst validatePasswordStrength = (scorer = defaultScorer) => value => {\n if (!scorer) return undefined;\n const strength = scorer.scoreFn(value);\n if (strength < scorer.minRequiredScore) {\n return 'auth.input.password_too_weak';\n }\n return undefined;\n};\n\nexport default validatePasswordStrength;\n","// Inspired by https://github.com/bartlomiejzuber/password-strength-score\n\n/**\n * @typedef PasswordStrengthOptions\n * @property {number} isVeryLongLength - Required characters for a very long password (default: 12)\n * @property {number} isLongLength - Required characters for a long password (default: 6)\n * @property {number} isVeryLongScore - Score for a very long password (default: 2.5)\n * @property {number} isLongScore - Score for a long password (default: 1.5)\n * @property {number} uppercaseScore - Score for a password with uppercase letters (default: 1)\n * @property {number} lowercaseScore - Score for a password with lowercase letters (default: 1)\n * @property {number} numbersScore - Score for a password with numbers (default: 1)\n * @property {number} nonAlphanumericsScore - Score for a password without non-alphanumeric characters (default: 1)\n */\n\n/** @type {PasswordStrengthOptions} */\nexport const defaultOptions = {\n isVeryLongLength: 14,\n isLongLength: 8,\n isLongScore: 2,\n isVeryLongScore: 4,\n uppercaseScore: 1,\n lowercaseScore: 1,\n numbersScore: 1,\n nonAlphanumericsScore: 1\n};\n\n/**\n *\n * @param {string} password Password text.\n * @param {PasswordStrengthOptions} options Password options.\n * @returns {number} The password strength score.\n */\nexport const passwordStrength = (password, options) => {\n if (!password) {\n return 0;\n }\n\n const mergedOptions = { ...defaultOptions, ...options };\n\n const longScore = (password.length >= mergedOptions.isLongLength && mergedOptions.isLongScore) || 0;\n const veryLongScore = (password.length >= mergedOptions.isVeryLongLength && mergedOptions.isVeryLongScore) || 0;\n const lowercaseScore = (/[a-z]/.test(password) && mergedOptions.lowercaseScore) || 0;\n const uppercaseScore = (/[A-Z]/.test(password) && mergedOptions.uppercaseScore) || 0;\n const numbersScore = (/\\d/.test(password) && mergedOptions.numbersScore) || 0;\n const nonalphasScore = (/\\W/.test(password) && mergedOptions.nonAlphanumericsScore) || 0;\n\n return uppercaseScore + lowercaseScore + numbersScore + nonalphasScore + longScore + veryLongScore;\n};\n\nexport const createPasswordScorer = (options = defaultOptions, minRequiredScore = 5) => {\n const mergedOptions = { ...defaultOptions, ...options };\n\n return {\n scoreFn: password => passwordStrength(password, mergedOptions),\n minRequiredScore,\n maxScore:\n mergedOptions.uppercaseScore +\n mergedOptions.lowercaseScore +\n mergedOptions.numbersScore +\n mergedOptions.nonAlphanumericsScore +\n mergedOptions.isLongScore +\n mergedOptions.isVeryLongScore\n };\n};\n\nexport const defaultScorer = createPasswordScorer(defaultOptions, 5);\n","import React from 'react';\nimport ColorGradientProgressBar from './ColorGradientProgressBar';\nimport { defaultScorer } from '../../passwordScorer';\n\nexport default function PasswordStrengthIndicator({ scorer = defaultScorer, password, ...restProps }) {\n const strength = scorer.scoreFn(password);\n return ;\n}\n","import React from 'react';\nimport { LinearProgress } from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\n/**\n * @typedef {object} Color\n * @property {number} red\n * @property {number} green\n * @property {number} blue\n */\n\n/**\n * Calculate a rgb-color from a gradient between `color1` and `color2`\n * @param {number} fade - Indicates the fade between `color1` and `color2` in the range [0, 1].\n * @param {Color} color1\n * @param {Color} color2\n * @returns {string} `` `rgb(${red}, ${green}, ${blue})` ``\n */\nconst colorGradient = (fade, color1, color2) => {\n const diffRed = color2.red - color1.red;\n const diffGreen = color2.green - color1.green;\n const diffBlue = color2.blue - color1.blue;\n\n const gradient = {\n red: Math.floor(color1.red + diffRed * fade),\n green: Math.floor(color1.green + diffGreen * fade),\n blue: Math.floor(color1.blue + diffBlue * fade)\n };\n\n return `rgb(${gradient.red},${gradient.green},${gradient.blue})`;\n};\n\n/**\n * A progress bar that changes its color between its min an max value.\n * @param {object} props\n * @param {Color} [props.badColor] - default: `#FF4047`\n * @param {Color} [props.goodColor] - default: `#00FF6E`\n * @param {number} props.maxVal\n * @param {number} props.minVal\n * @param {number} props.currentVal\n */\nexport default function ColorGradientProgressBar(props) {\n const { minVal, maxVal, currentVal, badColor, goodColor, ...restProps } = props;\n\n const color1 = badColor || { red: 0xff, green: 0x40, blue: 0x47 };\n const color2 = goodColor || { red: 0x00, green: 0xff, blue: 0x6e };\n\n const fade = Math.max(0, Math.min(1, (currentVal - minVal) / (maxVal - minVal)));\n const currentColor = colorGradient(fade, color1, color2);\n\n const StyledLinearProgress = withStyles({\n colorPrimary: {\n backgroundColor: 'black' // '#e0e0e0'\n },\n barColorPrimary: {\n backgroundColor: currentColor\n }\n })(LinearProgress);\n\n return ;\n}\n","const USED_SEARCH_PARAMS = ['signup', 'reset_password', 'new_password', 'email', 'force-email'];\n\nconst getSearchParamsRest = searchParams => {\n const rest = [];\n for (const [key, value] of searchParams.entries()) {\n if (!USED_SEARCH_PARAMS.includes(key)) {\n rest.push(`${key}=${encodeURIComponent(value)}`);\n }\n }\n return rest.length > 0 ? rest.join('&') : '';\n};\n\nexport default getSearchParamsRest;\n","import * as React from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, TextInput, required, email, useLogin } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: 450\n },\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\nconst LoginForm = ({ postLoginRedirect, allowUsername }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const login = useLogin();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const redirectTo = postLoginRedirect\n ? `${postLoginRedirect}?${getSearchParamsRest(searchParams)}`\n : searchParams.get('redirect');\n const interactionId = searchParams.get('interaction_id');\n\n const submit = values => {\n setLoading(true);\n login({ ...values, redirectTo, interactionId })\n .then(() => {\n setLoading(false);\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n validate={allowUsername ? [required()] : [required(), email()]}\n />\n \n \n {loading ? (\n \n ) : (\n translate('auth.action.login')\n )}\n \n \n
\n );\n};\n\nLoginForm.defaultValues = {\n redirectTo: '/',\n allowUsername: false\n};\n\nexport default LoginForm;\n","import React, { useState } from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport { defaultScorer } from '../../passwordScorer';\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\n/**\n *\n * @param {string} redirectTo\n * @param {Object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }) => {\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const token = searchParams.get('token');\n\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n\n const [newPassword, setNewPassword] = useState('');\n\n const submit = values => {\n setLoading(true);\n authProvider\n .setNewPassword({ ...values, token })\n .then(res => {\n setTimeout(() => {\n window.location.href = `/login${redirectTo ? `?redirect=${encodeURIComponent(redirectTo)}` : ''}`;\n setLoading(false);\n }, 2000);\n notify('auth.notification.password_changed', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n {passwordScorer && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n\n \n \n )}\n setNewPassword(e.target.value)}\n />\n \n \n {loading ? (\n \n ) : (\n translate('auth.action.set_new_password')\n )}\n \n \n
\n );\n};\n\nexport default NewPasswordForm;\n","import React from 'react';\nimport { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin';\nimport { Button, CardContent, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\nconst ResetPasswordForm = () => {\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n\n const submit = values => {\n setLoading(true);\n authProvider\n .resetPassword({ ...values })\n .then(res => {\n setLoading(false);\n notify('auth.notification.reset_password_submitted', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.reset_password')\n )}\n \n \n
\n );\n};\n\nexport default ResetPasswordForm;\n","import React from 'react';\nimport { Box, Card, Typography } from '@mui/material';\nimport { Notification } from 'react-admin';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.secondary.main\n }\n },\n root: {\n backgroundColor: theme.palette.secondary.main\n },\n card: {\n minWidth: 300,\n maxWidth: 500,\n marginTop: '6em',\n [theme.breakpoints.down('sm')]: {\n margin: '1em'\n }\n },\n icon: {\n marginTop: 5,\n marginRight: 5\n },\n title: {\n [theme.breakpoints.down('sm')]: {\n fontWeight: 'bold',\n marginTop: 12\n }\n }\n}));\n\nconst SimpleBox = ({ title, icon, text, children }) => {\n const classes = useStyles();\n return (\n \n \n \n {icon && React.cloneElement(icon, { fontSize: 'large', className: classes.icon })}\n \n {title}\n \n \n \n {text}\n \n {children}\n \n \n \n );\n};\n\nexport default SimpleBox;\n","import React from 'react';\nimport { Resource, usePermissions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport { rightsToCreate } from '../constants';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissions(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef, useCallback } from 'react';\nimport { Logout, UserMenu as RaUserMenu, useGetIdentity, useTranslate, useUserMenu } from 'react-admin';\nimport { MenuItem, ListItemIcon, ListItemText } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useNavigate } from 'react-router-dom';\n\n// It's important to pass the ref to allow Material UI to manage the keyboard navigation\nconst UserMenuItem = forwardRef(({ label, icon, to, ...rest }, ref) => {\n const { onClose } = useUserMenu();\n const translate = useTranslate();\n const navigate = useNavigate();\n const onClick = useCallback(() => {\n navigate(to);\n onClose();\n }, [to, onClose, navigate]);\n return (\n \n {icon && {React.cloneElement(icon, { fontSize: 'small' })}}\n {translate(label)}\n \n );\n});\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { identity } = useGetIdentity();\n return (\n \n {identity && identity.id !== ''\n ? [\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}/show`}\n />,\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}`}\n />,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n logout: ,\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import React, { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = message => {\n const { identity, isLoading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!isLoading && !identity?.id) {\n notify(message || 'ra.auth.auth_check_error', { type: 'error' });\n redirect(`/login?redirect=${encodeURIComponent(location.pathname + location.search)}`);\n }\n }, [isLoading, identity, redirect, notify, location]);\n\n return { identity, isLoading };\n};\n\nexport default useCheckAuthenticated;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n permissions: 'Permissions',\n signup: 'Signup',\n reset_password: 'Reset password',\n set_new_password: 'Set new password',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address',\n current_password: 'Current password',\n new_password: 'New password',\n confirm_new_password: 'Confirm new password',\n password_strength: 'Password strength',\n password_too_weak: 'Password too weak. Increase length or add special characters.'\n },\n helper: {\n login: 'Sign in to your account',\n signup: 'Create your account',\n reset_password: 'Enter your email address below and we will send you a link to reset your password',\n set_new_password: 'Please enter your email address and a new password below'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n unable_to_fetch_user_data: 'Unable to fetch user data',\n no_token_returned: 'No token returned',\n invalid_token_returned: 'Invalid token returned',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider:\n 'Please choose a POD provider in the list below. All application data will be saved on your POD.'\n },\n notification: {\n reset_password_submitted: 'An email has been sent with reset password instructions',\n reset_password_error: 'An error occurred',\n password_changed: 'Password changed successfully',\n new_password_error: 'An error occurred',\n invalid_password: 'Invalid password',\n get_settings_error: 'An error occurred',\n update_settings_error: 'An error occurred'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la ressource',\n login_required: 'Connexion requise'\n },\n action: {\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n reset_password: 'Mot de passe oublié ?',\n set_new_password: 'Définir le mot de passe',\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail',\n current_password: 'Mot de passe actuel',\n new_password: 'Nouveau mot de passe',\n confirm_new_password: 'Confirmer le nouveau mot de passe',\n password_strength: 'Force du mot de passe',\n password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.'\n },\n helper: {\n login: 'Connectez-vous à votre compte.',\n signup: 'Créez votre compte',\n reset_password:\n 'Entrez votre adresse mail ci-dessous et nous vous enverrons un lien pour réinitialiser votre mot de passe',\n set_new_password: 'Veuillez entrer votre adresse mail et un nouveau mot de passe ci-dessous'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n unable_to_fetch_user_data: 'Impossible de récupérer les données du profil',\n no_token_returned: 'Aucun token a été retourné',\n invalid_token_returned: 'Token invalide',\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider:\n \"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD.\"\n },\n notification: {\n reset_password_submitted: 'Un e-mail a été envoyé avec les instructions de réinitialisation du mot de passe',\n reset_password_error: \"Une erreur s'est produite\",\n password_changed: 'Le mot de passe a été changé avec succès',\n new_password_error: \"Une erreur s'est produite\",\n invalid_password: 'Mot de passe incorrect',\n get_settings_error: \"Une erreur s'est produite\",\n update_settings_error: \"Une erreur s'est produite\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":[],"version":3,"file":"index.cjs.js.map"} \ No newline at end of file diff --git a/src/frontend/packages/auth-provider/dist/index.es.js b/src/frontend/packages/auth-provider/dist/index.es.js index 47f204c7e..50668abd2 100644 --- a/src/frontend/packages/auth-provider/dist/index.es.js +++ b/src/frontend/packages/auth-provider/dist/index.es.js @@ -1956,8 +1956,7 @@ const $b403c35bd8d76c50$var$useStyles = (0, $1obPJ$muistylesmakeStyles)((theme)= (0, $1obPJ$required)(), (0, $7a0bbe6824860dfe$export$2e2bcd8739ae039)(passwordScorer) ], - onChange: (e)=>setNewPassword(e.target.value), - format: (value)=>value ? value.toLowerCase() : "" + onChange: (e)=>setNewPassword(e.target.value) }), /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { autoFocus: true, @@ -1967,8 +1966,7 @@ const $b403c35bd8d76c50$var$useStyles = (0, $1obPJ$muistylesmakeStyles)((theme)= autoComplete: "current-password", fullWidth: true, disabled: loading, - validate: (0, $1obPJ$required)(), - format: (value)=>value ? value.toLowerCase() : "" + validate: (0, $1obPJ$required)() }), /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Button1), { variant: "contained", diff --git a/src/frontend/packages/auth-provider/dist/index.es.js.map b/src/frontend/packages/auth-provider/dist/index.es.js.map index 45526cc6b..dea2517ae 100644 --- a/src/frontend/packages/auth-provider/dist/index.es.js.map +++ b/src/frontend/packages/auth-provider/dist/index.es.js.map @@ -1 +1 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEEO,MAAM,4CAAiB,CAAA,QAAU,CAAC,QAAQ,YAAY,MAAM,OAAO,CAAC,SAAS,QAAQ;QAAC;KAAM;AAI5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gBACN,QAAQ;gBACR,OAAO;gBACP,SAAS;YACX;YACA,WAAW;gBACT,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,SAAS;YACX;QACF;QACA,OAAO;YACL,WAAW;YACX,eAAe;QACjB;QACA,OAAO;YACL,cAAc;YACd,MAAM;YACN,UAAU;YACV,OAAO;YACP,mBAAmB;YACnB,kBAAkB;YAClB,cAAc;YACd,sBAAsB;YACtB,mBAAmB;YACnB,mBAAmB;QACrB;QACA,QAAQ;YACN,OAAO;YACP,QAAQ;YACR,gBACE;YACF,kBAAkB;QACpB;QACA,SAAS;YACP,yBAAyB;YACzB,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,4BAA4B;YAC5B,0BAA0B;YAC1B,2BAA2B;YAC3B,mBAAmB;YACnB,wBAAwB;YACxB,2BAA2B;YAC3B,sBAAsB;YACtB,kBAAkB;YAClB,gBAAgB;YAChB,kBACE;YACF,kBAAkB;YAClB,gBAAgB;YAChB,mBAAmB;YACnB,aAAa;YACb,0BAA0B;YAC1B,mBAAmB;YACnB,qBACE;QACJ;QACA,cAAc;YACZ,0BAA0B;YAC1B,sBAAsB;YACtB,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;QACzB;IACF;AACF;IAEA,2CAAe;","sources":["packages/auth-provider/src/index.ts","packages/auth-provider/src/authProvider.js","packages/auth-provider/src/utils.js","packages/auth-provider/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/hooks/useCheckPermissions.js","packages/auth-provider/src/constants.js","packages/auth-provider/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/crud/edit/EditActionsWithPermissions.js","packages/auth-provider/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/hooks/useAgents.js","packages/auth-provider/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/crud/show/ShowActionsWithPermissions.js","packages/auth-provider/src/components/AuthDialog.js","packages/auth-provider/src/components/SsoLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/SignupForm.js","packages/auth-provider/src/hooks/useSignup.js","packages/auth-provider/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/passwordScorer.js","packages/auth-provider/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/components/LocalLoginPage/LoginForm.js","packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/components/ResourceWithPermissions.js","packages/auth-provider/src/components/UserMenu.js","packages/auth-provider/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/messages/english.js","packages/auth-provider/src/messages/french.js"],"sourcesContent":["export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport * as oauth from 'oauth4webapi';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl, delay } from './utils';\n\nconst AUTH_TYPE_SSO = 'sso';\nconst AUTH_TYPE_LOCAL = 'local';\nconst AUTH_TYPE_POD = 'pod';\nconst AUTH_TYPE_SOLID_OIDC = 'solid-oidc';\n\nconst authProvider = ({\n dataProvider,\n authType,\n allowAnonymous = true,\n checkUser,\n checkPermissions = false,\n clientId\n}) => {\n if (![AUTH_TYPE_SSO, AUTH_TYPE_LOCAL, AUTH_TYPE_POD, AUTH_TYPE_SOLID_OIDC].includes(authType))\n throw new Error('The authType parameter is missing from the auth provider');\n if (authType === AUTH_TYPE_SOLID_OIDC && !clientId)\n throw new Error('The clientId parameter is required for solid-oidc authentication');\n return {\n login: async params => {\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const { webId, issuer } = params;\n\n if (webId && !issuer) {\n // TODO find issuer from webId\n }\n\n const as = await oauth\n .discoveryRequest(new URL(issuer))\n .then(response => oauth.processDiscoveryResponse(new URL(issuer), response));\n\n const codeVerifier = oauth.generateRandomCodeVerifier();\n const codeChallenge = await oauth.calculatePKCECodeChallenge(codeVerifier);\n const codeChallengeMethod = 'S256';\n\n // Save to use on handleCallback method\n localStorage.setItem('code_verifier', codeVerifier);\n\n const authorizationUrl = new URL(as.authorization_endpoint);\n authorizationUrl.searchParams.set('response_type', 'code');\n authorizationUrl.searchParams.set('client_id', clientId);\n authorizationUrl.searchParams.set('code_challenge', codeChallenge);\n authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);\n authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);\n authorizationUrl.searchParams.set('scope', 'openid webid offline_access');\n\n window.location = authorizationUrl;\n } else if (authType === AUTH_TYPE_LOCAL) {\n const { username, password, interactionId, redirectTo } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n password: password.trim(),\n interactionId\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n if (redirectTo) {\n if (interactionId) await delay(3000); // Ensure the interactionId has been received and processed\n window.location.href = redirectTo;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n }\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n } else if (authType === AUTH_TYPE_SSO) {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n if (params.redirect) redirectUrl += `&redirect=${encodeURIComponent(params.redirect)}`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n handleCallback: async () => {\n const { searchParams } = new URL(window.location);\n\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const issuer = new URL(searchParams.get('iss'));\n const as = await oauth\n .discoveryRequest(issuer)\n .then(response => oauth.processDiscoveryResponse(issuer, response));\n\n const client = {\n client_id: clientId,\n token_endpoint_auth_method: 'none' // We don't have a client secret\n };\n\n const currentUrl = new URL(window.location.href);\n const params = oauth.validateAuthResponse(as, client, currentUrl, oauth.expectNoState);\n if (oauth.isOAuth2Error(params)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Retrieve code verifier set during login\n const codeVerifier = localStorage.getItem('code_verifier');\n\n const response = await oauth.authorizationCodeGrantRequest(\n as,\n client,\n params,\n `${window.location.origin}/auth-callback`,\n codeVerifier\n );\n\n const result = await oauth.processAuthorizationCodeOpenIDResponse(as, client, response);\n if (oauth.isOAuth2Error(result)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Until DPoP is implemented, use the ID token to log into local Pod\n // And the proxy endpoint to log into remote Pods\n localStorage.setItem('token', result.id_token);\n\n // Remove code verifier now we don't need it anymore\n localStorage.removeItem('code_verifier');\n\n // Reload to ensure the dataServer config is reset\n window.location.href = '/';\n } else {\n const token = searchParams.get('token');\n if (!token) throw new Error('auth.message.no_token_returned');\n\n let webId;\n try {\n ({ webId } = jwtDecode(token));\n } catch (e) {\n throw new Error('auth.message.invalid_token_returned');\n }\n const { json } = await dataProvider.fetch(webId);\n\n if (!json) throw new Error('auth.message.unable_to_fetch_user_data');\n\n if (checkUser && !checkUser(json)) throw new Error('auth.message.user_not_allowed_to_login');\n\n localStorage.setItem('token', token);\n\n // Reload to ensure the dataServer config is reset\n window.location.href = '/';\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (authType === AUTH_TYPE_LOCAL) {\n const { username, email, password, domain, interactionId, ...profileData } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n email: email.trim(),\n password: password.trim(),\n interactionId,\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n const { webId } = jwtDecode(token);\n return webId;\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error(e.message || 'ra.auth.sign_in_error');\n }\n }\n } else {\n const redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n logout: async () => {\n switch (authType) {\n case AUTH_TYPE_LOCAL: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n let result = {};\n\n try {\n result = await dataProvider.fetch(urlJoin(authServerUrl, '.well-known/openid-configuration'));\n } catch (e) {\n // Do nothing if it fails\n }\n\n if (result.status === 200 && result.json) {\n // Redirect to OIDC endpoint if it exists\n window.location.href = result.json.end_session_endpoint;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n }\n\n break;\n }\n\n case AUTH_TYPE_SSO: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n const baseUrl = new URL(window.location.href).origin;\n return urlJoin(\n authServerUrl,\n `auth/logout?redirectUrl=${encodeURIComponent(`${urlJoin(baseUrl, 'login')}?logout=true`)}`\n );\n }\n\n case AUTH_TYPE_POD: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n // Delete token but also any other value in local storage\n localStorage.clear();\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://activitypods.org/ns/core#FrontAppRegistration'\n )}`;\n }\n break;\n }\n\n case AUTH_TYPE_SOLID_OIDC: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webid: webId } = jwtDecode(token); // Not webId !!\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://www.w3.org/ns/solid/interop#ApplicationRegistration'\n )}`;\n }\n break;\n }\n\n default:\n break;\n }\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n }\n return true;\n },\n checkError: error => Promise.resolve(),\n getPermissions: async uri => {\n if (!checkPermissions) return;\n\n // React-admin calls getPermissions with an empty object on every page refresh\n // It also passes an object `{ params: { route: 'dashboard' } }` on the Dashboard\n // Ignore all this until we found a way to bypass these redundant calls\n if (typeof uri === 'object') return;\n\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch (e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const authorization = {\n '@id': `#${mode.replace('acl:', '')}`,\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n const { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const payload = jwtDecode(token);\n const webId = payload.webId || payload.webid; // Currently we must deal with both formats\n\n if (!webId) throw new Error('No webId found on provided token !');\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName:\n profileData?.['vcard:given-name'] ||\n profileData?.['pair:label'] ||\n webIdData['foaf:name'] ||\n webIdData['pair:label'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('auth.notification.reset_password_error');\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('auth.notification.new_password_error');\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('auth.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({\n currentPassword,\n email: email?.trim(),\n newPassword\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('auth.notification.invalid_password');\n }\n\n throw new Error('auth.notification.update_settings_error');\n }\n }\n };\n};\n\nexport default authProvider;\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a POD, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? new URL(authServer.baseUrl).origin : authServer.baseUrl;\n};\n\nexport const delay = async t => new Promise(resolve => setTimeout(resolve, t));\n","import React from 'react';\nimport { Create, CreateActions, useResourceContext } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const resource = useResourceContext();\n const createContainerUri = useCreateContainer(resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import React, { useEffect } from 'react';\nimport { usePermissions, useRedirect, useNotify, useGetIdentity } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\n\nconst useCheckPermissions = (uri, mode, redirectUrl = '/') => {\n const { identity, isLoading } = useGetIdentity();\n const { permissions } = usePermissions(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (!isLoading && identity && permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], { type: 'error' });\n redirect(redirectUrl);\n }\n }, [permissions, identity, redirect, notify, isLoading]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","export const ACL_READ = 'acl:Read';\nexport const ACL_APPEND = 'acl:Append';\nexport const ACL_WRITE = 'acl:Write';\nexport const ACL_CONTROL = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React from 'react';\nimport { Edit, useGetRecordId } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport {\n usePermissionsOptimized,\n ShowButton,\n ListButton,\n TopToolbar,\n useResourceDefinition,\n useRecordContext\n} from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl } from '../../constants';\n\nconst EditActionsWithPermissions = () => {\n const { hasList, hasShow } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasShow && }\n {!!permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React, { useState } from 'react';\nimport { Button, useRecordContext, useResourceContext } from 'react-admin';\nimport ShareIcon from '@mui/icons-material/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ isContainer }) => {\n const record = useRecordContext();\n const resource = useResourceContext();\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nPermissionsButton.defaultProps = {\n isContainer: false\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport PersonIcon from '@mui/icons-material/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { data } = useGetList(\n 'Person',\n {\n pagination: { page: 1, perPage: 100 },\n sort: { field: 'pair:label', order: 'ASC' },\n filter: { q: inputValue }\n },\n {\n enabled: inputValue.length > 0\n }\n );\n\n useEffect(() => {\n setOptions(data?.length > 0 ? Object.values(data) : []);\n }, [data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={(props, option) => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport { List } from '@mui/material';\nimport { styled } from '@mui/system';\nimport AgentItem from './AgentItem';\n\nconst StyledList = styled(List)(({ theme }) => ({\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport EditIcon from '@mui/icons-material/Edit';\nimport CheckIcon from '@mui/icons-material/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport PublicIcon from '@mui/icons-material/Public';\nimport VpnLockIcon from '@mui/icons-material/VpnLock';\nimport PersonIcon from '@mui/icons-material/Person';\nimport GroupIcon from '@mui/icons-material/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error(`Unknown agent predicate: ${agent.predicate}`);\n }\n};\n\nexport default AgentIcon;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissions, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissions(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n const result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (const p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { SaveButton, Toolbar, ToolbarProps } from 'react-admin';\nimport { styled } from '@mui/material/styles';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst StyledToolbar = styled(Toolbar)(() => ({\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n}));\n\nconst EditToolbarWithPermissions: React.FunctionComponent = props => (\n \n \n \n \n);\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { EditButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToEdit } from '../../constants';\n\nconst EditButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToEdit.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default EditButtonWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport {\n CreateButton,\n ExportButton,\n useResourceDefinition,\n TopToolbar,\n usePermissions,\n useResourceContext\n} from 'react-admin';\nimport { useMediaQuery } from '@mui/material';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n sort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n selectedIds,\n showFilter,\n total\n}) => {\n const resource = useResourceContext();\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition();\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissions(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n filterValues,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { Show, useGetRecordId } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'show');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport {\n EditButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext\n} from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit } from '../../constants';\n\nconst ShowActionsWithPermissions = () => {\n const { hasList, hasEdit } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n return (\n \n {hasList && }\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useRef, useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useDataProvider, useAuthProvider, useLogin, useGetIdentity, useNotify } from 'react-admin';\nimport { Card, Avatar, Typography, Button, CardActions } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport LockIcon from '@mui/icons-material/Lock';\n\nconst delay = async t => new Promise(resolve => setTimeout(resolve, t));\n\n// Inspired from https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/auth/Login.tsx\nconst SsoLoginPage = ({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }) => {\n const containerRef = useRef();\n let backgroundImageLoaded = false;\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { identity, isLoading } = useGetIdentity();\n\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n // Already authenticated, redirect to the home page\n navigate(searchParams.get('redirect') || '/');\n }\n }, [identity, isLoading, navigate, searchParams]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', { type: 'error' });\n } else {\n notify('auth.message.bad_request', { type: 'error', messageArgs: { error: searchParams.get('error') } });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n localStorage.setItem('token', token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n localStorage.removeItem('token');\n notify('auth.message.user_not_allowed_to_login', { type: 'error' });\n navigate.replace('/login');\n } else if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = searchParams.get('redirect');\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', { type: 'info' });\n window.location.href = `/${userResource}/${encodeURIComponent(webId)}`;\n } else {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = '/';\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', { type: 'info' });\n navigate('/');\n }\n })();\n }, [searchParams, navigate, notify, userResource]);\n\n const updateBackgroundImage = () => {\n if (!backgroundImageLoaded && containerRef.current) {\n containerRef.current.style.backgroundImage = `url(${backgroundImage})`;\n backgroundImageLoaded = true;\n }\n };\n\n // Load background image asynchronously to speed up time to interactive\n const lazyLoadBackgroundImage = () => {\n if (backgroundImage) {\n const img = new Image();\n img.onload = updateBackgroundImage;\n img.src = backgroundImage;\n }\n };\n\n useEffect(() => {\n if (!backgroundImageLoaded) {\n lazyLoadBackgroundImage();\n }\n });\n\n if (isLoading) return null;\n\n return (\n \n \n
\n \n \n \n
\n {text && {text}}\n {buttons?.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n );\n};\n\nconst PREFIX = 'SsoLoginPage';\n\nexport const SsoLoginPageClasses = {\n card: `${PREFIX}-card`,\n avatar: `${PREFIX}-avatar`,\n icon: `${PREFIX}-icon`,\n switch: `${PREFIX}-switch`\n};\n\nconst Root = styled('div', {\n name: PREFIX,\n overridesResolver: (props, styles) => styles.root\n})(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',\n [`& .${SsoLoginPageClasses.card}`]: {\n minWidth: 300,\n marginTop: '6em'\n },\n [`& .${SsoLoginPageClasses.avatar}`]: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n [`& .${SsoLoginPageClasses.icon}`]: {\n backgroundColor: theme.palette.secondary[500]\n },\n [`& .${SsoLoginPageClasses.switch}`]: {\n marginBottom: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import React, { useEffect, useMemo } from 'react';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport { useTranslate, useGetIdentity } from 'react-admin';\nimport { Card, Typography } from '@mui/material';\nimport LockIcon from '@mui/icons-material/Lock';\nimport makeStyles from '@mui/styles/makeStyles';\nimport SignupForm from './SignupForm';\nimport LoginForm from './LoginForm';\nimport NewPasswordForm from './NewPasswordForm';\nimport ResetPasswordForm from './ResetPasswordForm';\nimport SimpleBox from './SimpleBox';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(() => ({\n switch: {\n marginBottom: '1em',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center'\n }\n}));\n\n/**\n * @param {object} props Props\n * @param {boolean} props.hasSignup If to show signup form.\n * @param {boolean} props.allowUsername Indicates, if login is allowed with username (instead of email).\n * @param {string} props.postSignupRedirect Location to redirect to after signup.\n * @param {string} props.postLoginRedirect Location to redirect to after login.\n * @param {object} props.additionalSignupValues\n * @param {object} props.passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst LocalLoginPage = ({\n hasSignup,\n allowUsername,\n postSignupRedirect,\n postLoginRedirect,\n additionalSignupValues,\n passwordScorer = defaultScorer\n}) => {\n const classes = useStyles();\n const navigate = useNavigate();\n const translate = useTranslate();\n const [searchParams] = useSearchParams();\n const isSignup = hasSignup && searchParams.has('signup');\n const isResetPassword = searchParams.has('reset_password');\n const isNewPassword = searchParams.has('new_password');\n const isLogin = !isSignup && !isResetPassword && !isNewPassword;\n const redirectTo = searchParams.get('redirect');\n const { identity, isLoading } = useGetIdentity();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n if (postLoginRedirect) {\n navigate(`${postLoginRedirect}?${getSearchParamsRest(searchParams)}`);\n } else if (redirectTo && redirectTo.startsWith('http')) {\n window.location.href = redirectTo;\n } else {\n navigate(redirectTo || '/');\n }\n }\n }, [identity, isLoading, navigate, searchParams, redirectTo, postLoginRedirect]);\n\n const [title, text] = useMemo(() => {\n if (isSignup) {\n return ['auth.action.signup', 'auth.helper.signup'];\n }\n if (isLogin) {\n return ['auth.action.login', 'auth.helper.login'];\n }\n if (isResetPassword) {\n return ['auth.action.reset_password', 'auth.helper.reset_password'];\n }\n if (isNewPassword) {\n return ['auth.action.set_new_password', 'auth.helper.set_new_password'];\n }\n }, [isSignup, isLogin, isResetPassword, isNewPassword]);\n\n if (isLoading || identity?.id) return null;\n\n return (\n }>\n \n {isSignup && (\n \n )}\n {isResetPassword && }\n {isNewPassword && }\n {isLogin && }\n
\n {isSignup && (\n \n {translate('auth.action.login')}\n \n )}\n {isLogin && (\n <>\n {hasSignup && (\n
\n \n {translate('auth.action.signup')}\n \n
\n )}\n
\n \n {translate('auth.action.reset_password')}\n \n
\n \n )}\n
\n
\n
\n );\n};\n\nLocalLoginPage.defaultProps = {\n hasSignup: true,\n allowUsername: false,\n additionalSignupValues: {}\n};\n\nexport default LocalLoginPage;\n","import * as React from 'react';\nimport createSlug from 'speakingurl';\nimport {\n Form,\n useTranslate,\n useNotify,\n useSafeSetState,\n TextInput,\n minLength,\n required,\n email,\n useLocaleState\n} from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport useSignup from '../../hooks/useSignup';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: 450\n },\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\n/**\n * @param postSignupRedirect\n * @param additionalSignupValues\n * @param delayBeforeRedirect\n * @param {string} redirectTo\n * @param {object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst SignupForm = ({\n passwordScorer = defaultScorer,\n postSignupRedirect,\n additionalSignupValues,\n delayBeforeRedirect\n}) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const [searchParams] = useSearchParams();\n const interactionId = searchParams.get('interaction_id');\n const redirectTo = searchParams.get('redirect');\n const [locale] = useLocaleState();\n const [password, setPassword] = React.useState('');\n\n const submit = values => {\n setLoading(true);\n signup({\n ...values,\n interactionId,\n ...additionalSignupValues\n })\n .then(() => {\n if (delayBeforeRedirect) {\n setTimeout(() => {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = postSignupRedirect\n ? `${postSignupRedirect}?${getSearchParamsRest(searchParams)}`\n : redirectTo || '/';\n setLoading(false);\n }, delayBeforeRedirect);\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = postSignupRedirect\n ? `${postSignupRedirect}?${getSearchParamsRest(searchParams)}`\n : redirectTo || '/';\n setLoading(false);\n }\n notify('auth.message.new_user_created', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'warning',\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n });\n };\n\n return (\n
\n \n \n value\n ? createSlug(value, {\n lang: locale || 'fr',\n separator: '_',\n custom: ['.', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n })\n : ''\n }\n />\n \n {passwordScorer && password && !(searchParams.has('email') && searchParams.has('force-email')) && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n \n \n )}\n setPassword(e.target.value)}\n label={translate('ra.auth.password')}\n autoComplete=\"new-password\"\n fullWidth\n disabled={loading || (searchParams.has('email') && searchParams.has('force-email'))}\n validate={[required(), validatePasswordStrength(passwordScorer)]}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.signup')\n )}\n \n \n
\n );\n};\n\nSignupForm.defaultValues = {\n redirectTo: '/',\n additionalSignupValues: {}\n};\n\nexport default SignupForm;\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import { defaultScorer } from '../../passwordScorer';\n\nconst validatePasswordStrength = (scorer = defaultScorer) => value => {\n if (!scorer) return undefined;\n const strength = scorer.scoreFn(value);\n if (strength < scorer.minRequiredScore) {\n return 'auth.input.password_too_weak';\n }\n return undefined;\n};\n\nexport default validatePasswordStrength;\n","// Inspired by https://github.com/bartlomiejzuber/password-strength-score\n\n/**\n * @typedef PasswordStrengthOptions\n * @property {number} isVeryLongLength - Required characters for a very long password (default: 12)\n * @property {number} isLongLength - Required characters for a long password (default: 6)\n * @property {number} isVeryLongScore - Score for a very long password (default: 2.5)\n * @property {number} isLongScore - Score for a long password (default: 1.5)\n * @property {number} uppercaseScore - Score for a password with uppercase letters (default: 1)\n * @property {number} lowercaseScore - Score for a password with lowercase letters (default: 1)\n * @property {number} numbersScore - Score for a password with numbers (default: 1)\n * @property {number} nonAlphanumericsScore - Score for a password without non-alphanumeric characters (default: 1)\n */\n\n/** @type {PasswordStrengthOptions} */\nexport const defaultOptions = {\n isVeryLongLength: 14,\n isLongLength: 8,\n isLongScore: 2,\n isVeryLongScore: 4,\n uppercaseScore: 1,\n lowercaseScore: 1,\n numbersScore: 1,\n nonAlphanumericsScore: 1\n};\n\n/**\n *\n * @param {string} password Password text.\n * @param {PasswordStrengthOptions} options Password options.\n * @returns {number} The password strength score.\n */\nexport const passwordStrength = (password, options) => {\n if (!password) {\n return 0;\n }\n\n const mergedOptions = { ...defaultOptions, ...options };\n\n const longScore = (password.length >= mergedOptions.isLongLength && mergedOptions.isLongScore) || 0;\n const veryLongScore = (password.length >= mergedOptions.isVeryLongLength && mergedOptions.isVeryLongScore) || 0;\n const lowercaseScore = (/[a-z]/.test(password) && mergedOptions.lowercaseScore) || 0;\n const uppercaseScore = (/[A-Z]/.test(password) && mergedOptions.uppercaseScore) || 0;\n const numbersScore = (/\\d/.test(password) && mergedOptions.numbersScore) || 0;\n const nonalphasScore = (/\\W/.test(password) && mergedOptions.nonAlphanumericsScore) || 0;\n\n return uppercaseScore + lowercaseScore + numbersScore + nonalphasScore + longScore + veryLongScore;\n};\n\nexport const createPasswordScorer = (options = defaultOptions, minRequiredScore = 5) => {\n const mergedOptions = { ...defaultOptions, ...options };\n\n return {\n scoreFn: password => passwordStrength(password, mergedOptions),\n minRequiredScore,\n maxScore:\n mergedOptions.uppercaseScore +\n mergedOptions.lowercaseScore +\n mergedOptions.numbersScore +\n mergedOptions.nonAlphanumericsScore +\n mergedOptions.isLongScore +\n mergedOptions.isVeryLongScore\n };\n};\n\nexport const defaultScorer = createPasswordScorer(defaultOptions, 5);\n","import React from 'react';\nimport ColorGradientProgressBar from './ColorGradientProgressBar';\nimport { defaultScorer } from '../../passwordScorer';\n\nexport default function PasswordStrengthIndicator({ scorer = defaultScorer, password, ...restProps }) {\n const strength = scorer.scoreFn(password);\n return ;\n}\n","import React from 'react';\nimport { LinearProgress } from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\n/**\n * @typedef {object} Color\n * @property {number} red\n * @property {number} green\n * @property {number} blue\n */\n\n/**\n * Calculate a rgb-color from a gradient between `color1` and `color2`\n * @param {number} fade - Indicates the fade between `color1` and `color2` in the range [0, 1].\n * @param {Color} color1\n * @param {Color} color2\n * @returns {string} `` `rgb(${red}, ${green}, ${blue})` ``\n */\nconst colorGradient = (fade, color1, color2) => {\n const diffRed = color2.red - color1.red;\n const diffGreen = color2.green - color1.green;\n const diffBlue = color2.blue - color1.blue;\n\n const gradient = {\n red: Math.floor(color1.red + diffRed * fade),\n green: Math.floor(color1.green + diffGreen * fade),\n blue: Math.floor(color1.blue + diffBlue * fade)\n };\n\n return `rgb(${gradient.red},${gradient.green},${gradient.blue})`;\n};\n\n/**\n * A progress bar that changes its color between its min an max value.\n * @param {object} props\n * @param {Color} [props.badColor] - default: `#FF4047`\n * @param {Color} [props.goodColor] - default: `#00FF6E`\n * @param {number} props.maxVal\n * @param {number} props.minVal\n * @param {number} props.currentVal\n */\nexport default function ColorGradientProgressBar(props) {\n const { minVal, maxVal, currentVal, badColor, goodColor, ...restProps } = props;\n\n const color1 = badColor || { red: 0xff, green: 0x40, blue: 0x47 };\n const color2 = goodColor || { red: 0x00, green: 0xff, blue: 0x6e };\n\n const fade = Math.max(0, Math.min(1, (currentVal - minVal) / (maxVal - minVal)));\n const currentColor = colorGradient(fade, color1, color2);\n\n const StyledLinearProgress = withStyles({\n colorPrimary: {\n backgroundColor: 'black' // '#e0e0e0'\n },\n barColorPrimary: {\n backgroundColor: currentColor\n }\n })(LinearProgress);\n\n return ;\n}\n","const USED_SEARCH_PARAMS = ['signup', 'reset_password', 'new_password', 'email', 'force-email'];\n\nconst getSearchParamsRest = searchParams => {\n const rest = [];\n for (const [key, value] of searchParams.entries()) {\n if (!USED_SEARCH_PARAMS.includes(key)) {\n rest.push(`${key}=${encodeURIComponent(value)}`);\n }\n }\n return rest.length > 0 ? rest.join('&') : '';\n};\n\nexport default getSearchParamsRest;\n","import * as React from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, TextInput, required, email, useLogin } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: 450\n },\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\nconst LoginForm = ({ postLoginRedirect, allowUsername }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const login = useLogin();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const redirectTo = postLoginRedirect\n ? `${postLoginRedirect}?${getSearchParamsRest(searchParams)}`\n : searchParams.get('redirect');\n const interactionId = searchParams.get('interaction_id');\n\n const submit = values => {\n setLoading(true);\n login({ ...values, redirectTo, interactionId })\n .then(() => {\n setLoading(false);\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n validate={allowUsername ? [required()] : [required(), email()]}\n />\n \n \n {loading ? (\n \n ) : (\n translate('auth.action.login')\n )}\n \n \n
\n );\n};\n\nLoginForm.defaultValues = {\n redirectTo: '/',\n allowUsername: false\n};\n\nexport default LoginForm;\n","import React, { useState } from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport { defaultScorer } from '../../passwordScorer';\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\n/**\n *\n * @param {string} redirectTo\n * @param {Object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }) => {\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const token = searchParams.get('token');\n\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n\n const [newPassword, setNewPassword] = useState('');\n\n const submit = values => {\n setLoading(true);\n authProvider\n .setNewPassword({ ...values, token })\n .then(res => {\n setTimeout(() => {\n window.location.href = `/login${redirectTo ? `?redirect=${encodeURIComponent(redirectTo)}` : ''}`;\n setLoading(false);\n }, 2000);\n notify('auth.notification.password_changed', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n {passwordScorer && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n\n \n \n )}\n setNewPassword(e.target.value)}\n format={value => (value ? value.toLowerCase() : '')}\n />\n (value ? value.toLowerCase() : '')}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.set_new_password')\n )}\n \n \n
\n );\n};\n\nexport default NewPasswordForm;\n","import React from 'react';\nimport { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin';\nimport { Button, CardContent, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\nconst ResetPasswordForm = () => {\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n\n const submit = values => {\n setLoading(true);\n authProvider\n .resetPassword({ ...values })\n .then(res => {\n setLoading(false);\n notify('auth.notification.reset_password_submitted', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.reset_password')\n )}\n \n \n
\n );\n};\n\nexport default ResetPasswordForm;\n","import React from 'react';\nimport { Box, Card, Typography } from '@mui/material';\nimport { Notification } from 'react-admin';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.secondary.main\n }\n },\n root: {\n backgroundColor: theme.palette.secondary.main\n },\n card: {\n minWidth: 300,\n maxWidth: 500,\n marginTop: '6em',\n [theme.breakpoints.down('sm')]: {\n margin: '1em'\n }\n },\n icon: {\n marginTop: 5,\n marginRight: 5\n },\n title: {\n [theme.breakpoints.down('sm')]: {\n fontWeight: 'bold',\n marginTop: 12\n }\n }\n}));\n\nconst SimpleBox = ({ title, icon, text, children }) => {\n const classes = useStyles();\n return (\n \n \n \n {icon && React.cloneElement(icon, { fontSize: 'large', className: classes.icon })}\n \n {title}\n \n \n \n {text}\n \n {children}\n \n \n \n );\n};\n\nexport default SimpleBox;\n","import React from 'react';\nimport { Resource, usePermissions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport { rightsToCreate } from '../constants';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissions(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef, useCallback } from 'react';\nimport { Logout, UserMenu as RaUserMenu, useGetIdentity, useTranslate, useUserMenu } from 'react-admin';\nimport { MenuItem, ListItemIcon, ListItemText } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useNavigate } from 'react-router-dom';\n\n// It's important to pass the ref to allow Material UI to manage the keyboard navigation\nconst UserMenuItem = forwardRef(({ label, icon, to, ...rest }, ref) => {\n const { onClose } = useUserMenu();\n const translate = useTranslate();\n const navigate = useNavigate();\n const onClick = useCallback(() => {\n navigate(to);\n onClose();\n }, [to, onClose, navigate]);\n return (\n \n {icon && {React.cloneElement(icon, { fontSize: 'small' })}}\n {translate(label)}\n \n );\n});\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { identity } = useGetIdentity();\n return (\n \n {identity && identity.id !== ''\n ? [\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}/show`}\n />,\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}`}\n />,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n logout: ,\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import React, { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = message => {\n const { identity, isLoading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!isLoading && !identity?.id) {\n notify(message || 'ra.auth.auth_check_error', { type: 'error' });\n redirect(`/login?redirect=${encodeURIComponent(location.pathname + location.search)}`);\n }\n }, [isLoading, identity, redirect, notify, location]);\n\n return { identity, isLoading };\n};\n\nexport default useCheckAuthenticated;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n permissions: 'Permissions',\n signup: 'Signup',\n reset_password: 'Reset password',\n set_new_password: 'Set new password',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address',\n current_password: 'Current password',\n new_password: 'New password',\n confirm_new_password: 'Confirm new password',\n password_strength: 'Password strength',\n password_too_weak: 'Password too weak. Increase length or add special characters.'\n },\n helper: {\n login: 'Sign in to your account',\n signup: 'Create your account',\n reset_password: 'Enter your email address below and we will send you a link to reset your password',\n set_new_password: 'Please enter your email address and a new password below'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n unable_to_fetch_user_data: 'Unable to fetch user data',\n no_token_returned: 'No token returned',\n invalid_token_returned: 'Invalid token returned',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider:\n 'Please choose a POD provider in the list below. All application data will be saved on your POD.'\n },\n notification: {\n reset_password_submitted: 'An email has been sent with reset password instructions',\n reset_password_error: 'An error occurred',\n password_changed: 'Password changed successfully',\n new_password_error: 'An error occurred',\n invalid_password: 'Invalid password',\n get_settings_error: 'An error occurred',\n update_settings_error: 'An error occurred'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la ressource',\n login_required: 'Connexion requise'\n },\n action: {\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n reset_password: 'Mot de passe oublié ?',\n set_new_password: 'Définir le mot de passe',\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail',\n current_password: 'Mot de passe actuel',\n new_password: 'Nouveau mot de passe',\n confirm_new_password: 'Confirmer le nouveau mot de passe',\n password_strength: 'Force du mot de passe',\n password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.'\n },\n helper: {\n login: 'Connectez-vous à votre compte.',\n signup: 'Créez votre compte',\n reset_password:\n 'Entrez votre adresse mail ci-dessous et nous vous enverrons un lien pour réinitialiser votre mot de passe',\n set_new_password: 'Veuillez entrer votre adresse mail et un nouveau mot de passe ci-dessous'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n unable_to_fetch_user_data: 'Impossible de récupérer les données du profil',\n no_token_returned: 'Aucun token a été retourné',\n invalid_token_returned: 'Token invalide',\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider:\n \"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD.\"\n },\n notification: {\n reset_password_submitted: 'Un e-mail a été envoyé avec les instructions de réinitialisation du mot de passe',\n reset_password_error: \"Une erreur s'est produite\",\n password_changed: 'Le mot de passe a été changé avec succès',\n new_password_error: \"Une erreur s'est produite\",\n invalid_password: 'Mot de passe incorrect',\n get_settings_error: \"Une erreur s'est produite\",\n update_settings_error: \"Une erreur s'est produite\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":[],"version":3,"file":"index.es.js.map"} \ No newline at end of file +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEEO,MAAM,4CAAiB,CAAA,QAAU,CAAC,QAAQ,YAAY,MAAM,OAAO,CAAC,SAAS,QAAQ;QAAC;KAAM;AAI5F,MAAM,4CAAY,CAAA;IACvB,MAAM,YAAY,IAAI,IAAI;IAC1B,OAAO,CAAA,GAAA,cAAM,EAAE,UAAU,MAAM,EAAE,QAAQ,UAAU,QAAQ;AAC7D;AAEO,MAAM,4CAAgB,CAAA,UAAY,CAAA;QACvC,SAAS;QACT,KAAK;QACL,MAAM;QACN,aAAa;YAAE,SAAS;QAAM;QAC9B,kBAAkB;YAAE,SAAS;QAAM;QACnC,kBAAkB;YAAE,SAAS;QAAM;QACnC,YAAY;YAAE,SAAS;QAAM;QAC7B,gBAAgB;YAAE,SAAS;QAAM;IACnC,CAAA;AAEO,MAAM,4CAAmB,OAAM;IACpC,MAAM,cAAc,MAAM,aAAa,cAAc;IACrD,MAAM,aAAa,OAAO,MAAM,CAAC,aAAa,IAAI,CAAC,CAAA,SAAU,OAAO,UAAU,KAAK;IACnF,IAAI,CAAC,YAAY,MAAM,IAAI,MAAM;IACjC,sFAAsF;IACtF,OAAO,WAAW,GAAG,GAAG,IAAI,IAAI,WAAW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YAClB,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;QACzB;IACF;AACF;IAEA,2CAAe;","sources":["packages/auth-provider/src/index.ts","packages/auth-provider/src/authProvider.js","packages/auth-provider/src/utils.js","packages/auth-provider/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/hooks/useCheckPermissions.js","packages/auth-provider/src/constants.js","packages/auth-provider/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/crud/edit/EditActionsWithPermissions.js","packages/auth-provider/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/hooks/useAgents.js","packages/auth-provider/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/crud/show/ShowActionsWithPermissions.js","packages/auth-provider/src/components/AuthDialog.js","packages/auth-provider/src/components/SsoLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/SignupForm.js","packages/auth-provider/src/hooks/useSignup.js","packages/auth-provider/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/passwordScorer.js","packages/auth-provider/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/components/LocalLoginPage/LoginForm.js","packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/components/ResourceWithPermissions.js","packages/auth-provider/src/components/UserMenu.js","packages/auth-provider/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/messages/english.js","packages/auth-provider/src/messages/french.js"],"sourcesContent":["export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport * as oauth from 'oauth4webapi';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl, delay } from './utils';\n\nconst AUTH_TYPE_SSO = 'sso';\nconst AUTH_TYPE_LOCAL = 'local';\nconst AUTH_TYPE_POD = 'pod';\nconst AUTH_TYPE_SOLID_OIDC = 'solid-oidc';\n\nconst authProvider = ({\n dataProvider,\n authType,\n allowAnonymous = true,\n checkUser,\n checkPermissions = false,\n clientId\n}) => {\n if (![AUTH_TYPE_SSO, AUTH_TYPE_LOCAL, AUTH_TYPE_POD, AUTH_TYPE_SOLID_OIDC].includes(authType))\n throw new Error('The authType parameter is missing from the auth provider');\n if (authType === AUTH_TYPE_SOLID_OIDC && !clientId)\n throw new Error('The clientId parameter is required for solid-oidc authentication');\n return {\n login: async params => {\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const { webId, issuer } = params;\n\n if (webId && !issuer) {\n // TODO find issuer from webId\n }\n\n const as = await oauth\n .discoveryRequest(new URL(issuer))\n .then(response => oauth.processDiscoveryResponse(new URL(issuer), response));\n\n const codeVerifier = oauth.generateRandomCodeVerifier();\n const codeChallenge = await oauth.calculatePKCECodeChallenge(codeVerifier);\n const codeChallengeMethod = 'S256';\n\n // Save to use on handleCallback method\n localStorage.setItem('code_verifier', codeVerifier);\n\n const authorizationUrl = new URL(as.authorization_endpoint);\n authorizationUrl.searchParams.set('response_type', 'code');\n authorizationUrl.searchParams.set('client_id', clientId);\n authorizationUrl.searchParams.set('code_challenge', codeChallenge);\n authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);\n authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);\n authorizationUrl.searchParams.set('scope', 'openid webid offline_access');\n\n window.location = authorizationUrl;\n } else if (authType === AUTH_TYPE_LOCAL) {\n const { username, password, interactionId, redirectTo } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n password: password.trim(),\n interactionId\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n if (redirectTo) {\n if (interactionId) await delay(3000); // Ensure the interactionId has been received and processed\n window.location.href = redirectTo;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n }\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n } else if (authType === AUTH_TYPE_SSO) {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n if (params.redirect) redirectUrl += `&redirect=${encodeURIComponent(params.redirect)}`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n handleCallback: async () => {\n const { searchParams } = new URL(window.location);\n\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const issuer = new URL(searchParams.get('iss'));\n const as = await oauth\n .discoveryRequest(issuer)\n .then(response => oauth.processDiscoveryResponse(issuer, response));\n\n const client = {\n client_id: clientId,\n token_endpoint_auth_method: 'none' // We don't have a client secret\n };\n\n const currentUrl = new URL(window.location.href);\n const params = oauth.validateAuthResponse(as, client, currentUrl, oauth.expectNoState);\n if (oauth.isOAuth2Error(params)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Retrieve code verifier set during login\n const codeVerifier = localStorage.getItem('code_verifier');\n\n const response = await oauth.authorizationCodeGrantRequest(\n as,\n client,\n params,\n `${window.location.origin}/auth-callback`,\n codeVerifier\n );\n\n const result = await oauth.processAuthorizationCodeOpenIDResponse(as, client, response);\n if (oauth.isOAuth2Error(result)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Until DPoP is implemented, use the ID token to log into local Pod\n // And the proxy endpoint to log into remote Pods\n localStorage.setItem('token', result.id_token);\n\n // Remove code verifier now we don't need it anymore\n localStorage.removeItem('code_verifier');\n\n // Reload to ensure the dataServer config is reset\n window.location.href = '/';\n } else {\n const token = searchParams.get('token');\n if (!token) throw new Error('auth.message.no_token_returned');\n\n let webId;\n try {\n ({ webId } = jwtDecode(token));\n } catch (e) {\n throw new Error('auth.message.invalid_token_returned');\n }\n const { json } = await dataProvider.fetch(webId);\n\n if (!json) throw new Error('auth.message.unable_to_fetch_user_data');\n\n if (checkUser && !checkUser(json)) throw new Error('auth.message.user_not_allowed_to_login');\n\n localStorage.setItem('token', token);\n\n // Reload to ensure the dataServer config is reset\n window.location.href = '/';\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (authType === AUTH_TYPE_LOCAL) {\n const { username, email, password, domain, interactionId, ...profileData } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n email: email.trim(),\n password: password.trim(),\n interactionId,\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n const { webId } = jwtDecode(token);\n return webId;\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error(e.message || 'ra.auth.sign_in_error');\n }\n }\n } else {\n const redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n logout: async () => {\n switch (authType) {\n case AUTH_TYPE_LOCAL: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n let result = {};\n\n try {\n result = await dataProvider.fetch(urlJoin(authServerUrl, '.well-known/openid-configuration'));\n } catch (e) {\n // Do nothing if it fails\n }\n\n if (result.status === 200 && result.json) {\n // Redirect to OIDC endpoint if it exists\n window.location.href = result.json.end_session_endpoint;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n }\n\n break;\n }\n\n case AUTH_TYPE_SSO: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n const baseUrl = new URL(window.location.href).origin;\n return urlJoin(\n authServerUrl,\n `auth/logout?redirectUrl=${encodeURIComponent(`${urlJoin(baseUrl, 'login')}?logout=true`)}`\n );\n }\n\n case AUTH_TYPE_POD: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n // Delete token but also any other value in local storage\n localStorage.clear();\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://activitypods.org/ns/core#FrontAppRegistration'\n )}`;\n }\n break;\n }\n\n case AUTH_TYPE_SOLID_OIDC: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webid: webId } = jwtDecode(token); // Not webId !!\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://www.w3.org/ns/solid/interop#ApplicationRegistration'\n )}`;\n }\n break;\n }\n\n default:\n break;\n }\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n }\n return true;\n },\n checkError: error => Promise.resolve(),\n getPermissions: async uri => {\n if (!checkPermissions) return;\n\n // React-admin calls getPermissions with an empty object on every page refresh\n // It also passes an object `{ params: { route: 'dashboard' } }` on the Dashboard\n // Ignore all this until we found a way to bypass these redundant calls\n if (typeof uri === 'object') return;\n\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch (e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const authorization = {\n '@id': `#${mode.replace('acl:', '')}`,\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n const { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const payload = jwtDecode(token);\n const webId = payload.webId || payload.webid; // Currently we must deal with both formats\n\n if (!webId) throw new Error('No webId found on provided token !');\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName:\n profileData?.['vcard:given-name'] ||\n profileData?.['pair:label'] ||\n webIdData['foaf:name'] ||\n webIdData['pair:label'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('auth.notification.reset_password_error');\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('auth.notification.new_password_error');\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('auth.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({\n currentPassword,\n email: email?.trim(),\n newPassword\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('auth.notification.invalid_password');\n }\n\n throw new Error('auth.notification.update_settings_error');\n }\n }\n };\n};\n\nexport default authProvider;\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a POD, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? new URL(authServer.baseUrl).origin : authServer.baseUrl;\n};\n\nexport const delay = async t => new Promise(resolve => setTimeout(resolve, t));\n","import React from 'react';\nimport { Create, CreateActions, useResourceContext } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const resource = useResourceContext();\n const createContainerUri = useCreateContainer(resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import React, { useEffect } from 'react';\nimport { usePermissions, useRedirect, useNotify, useGetIdentity } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\n\nconst useCheckPermissions = (uri, mode, redirectUrl = '/') => {\n const { identity, isLoading } = useGetIdentity();\n const { permissions } = usePermissions(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (!isLoading && identity && permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], { type: 'error' });\n redirect(redirectUrl);\n }\n }, [permissions, identity, redirect, notify, isLoading]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","export const ACL_READ = 'acl:Read';\nexport const ACL_APPEND = 'acl:Append';\nexport const ACL_WRITE = 'acl:Write';\nexport const ACL_CONTROL = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React from 'react';\nimport { Edit, useGetRecordId } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport {\n usePermissionsOptimized,\n ShowButton,\n ListButton,\n TopToolbar,\n useResourceDefinition,\n useRecordContext\n} from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl } from '../../constants';\n\nconst EditActionsWithPermissions = () => {\n const { hasList, hasShow } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasShow && }\n {!!permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React, { useState } from 'react';\nimport { Button, useRecordContext, useResourceContext } from 'react-admin';\nimport ShareIcon from '@mui/icons-material/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ isContainer }) => {\n const record = useRecordContext();\n const resource = useResourceContext();\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nPermissionsButton.defaultProps = {\n isContainer: false\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport PersonIcon from '@mui/icons-material/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { data } = useGetList(\n 'Person',\n {\n pagination: { page: 1, perPage: 100 },\n sort: { field: 'pair:label', order: 'ASC' },\n filter: { q: inputValue }\n },\n {\n enabled: inputValue.length > 0\n }\n );\n\n useEffect(() => {\n setOptions(data?.length > 0 ? Object.values(data) : []);\n }, [data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={(props, option) => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport { List } from '@mui/material';\nimport { styled } from '@mui/system';\nimport AgentItem from './AgentItem';\n\nconst StyledList = styled(List)(({ theme }) => ({\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport EditIcon from '@mui/icons-material/Edit';\nimport CheckIcon from '@mui/icons-material/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport PublicIcon from '@mui/icons-material/Public';\nimport VpnLockIcon from '@mui/icons-material/VpnLock';\nimport PersonIcon from '@mui/icons-material/Person';\nimport GroupIcon from '@mui/icons-material/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error(`Unknown agent predicate: ${agent.predicate}`);\n }\n};\n\nexport default AgentIcon;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissions, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissions(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n const result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (const p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { SaveButton, Toolbar, ToolbarProps } from 'react-admin';\nimport { styled } from '@mui/material/styles';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst StyledToolbar = styled(Toolbar)(() => ({\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n}));\n\nconst EditToolbarWithPermissions: React.FunctionComponent = props => (\n \n \n \n \n);\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { EditButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToEdit } from '../../constants';\n\nconst EditButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToEdit.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default EditButtonWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport {\n CreateButton,\n ExportButton,\n useResourceDefinition,\n TopToolbar,\n usePermissions,\n useResourceContext\n} from 'react-admin';\nimport { useMediaQuery } from '@mui/material';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n sort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n selectedIds,\n showFilter,\n total\n}) => {\n const resource = useResourceContext();\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition();\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissions(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n filterValues,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { Show, useGetRecordId } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'show');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport {\n EditButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext\n} from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit } from '../../constants';\n\nconst ShowActionsWithPermissions = () => {\n const { hasList, hasEdit } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n return (\n \n {hasList && }\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useRef, useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useDataProvider, useAuthProvider, useLogin, useGetIdentity, useNotify } from 'react-admin';\nimport { Card, Avatar, Typography, Button, CardActions } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport LockIcon from '@mui/icons-material/Lock';\n\nconst delay = async t => new Promise(resolve => setTimeout(resolve, t));\n\n// Inspired from https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/auth/Login.tsx\nconst SsoLoginPage = ({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }) => {\n const containerRef = useRef();\n let backgroundImageLoaded = false;\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { identity, isLoading } = useGetIdentity();\n\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n // Already authenticated, redirect to the home page\n navigate(searchParams.get('redirect') || '/');\n }\n }, [identity, isLoading, navigate, searchParams]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', { type: 'error' });\n } else {\n notify('auth.message.bad_request', { type: 'error', messageArgs: { error: searchParams.get('error') } });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n localStorage.setItem('token', token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n localStorage.removeItem('token');\n notify('auth.message.user_not_allowed_to_login', { type: 'error' });\n navigate.replace('/login');\n } else if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = searchParams.get('redirect');\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', { type: 'info' });\n window.location.href = `/${userResource}/${encodeURIComponent(webId)}`;\n } else {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = '/';\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', { type: 'info' });\n navigate('/');\n }\n })();\n }, [searchParams, navigate, notify, userResource]);\n\n const updateBackgroundImage = () => {\n if (!backgroundImageLoaded && containerRef.current) {\n containerRef.current.style.backgroundImage = `url(${backgroundImage})`;\n backgroundImageLoaded = true;\n }\n };\n\n // Load background image asynchronously to speed up time to interactive\n const lazyLoadBackgroundImage = () => {\n if (backgroundImage) {\n const img = new Image();\n img.onload = updateBackgroundImage;\n img.src = backgroundImage;\n }\n };\n\n useEffect(() => {\n if (!backgroundImageLoaded) {\n lazyLoadBackgroundImage();\n }\n });\n\n if (isLoading) return null;\n\n return (\n \n \n
\n \n \n \n
\n {text && {text}}\n {buttons?.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n );\n};\n\nconst PREFIX = 'SsoLoginPage';\n\nexport const SsoLoginPageClasses = {\n card: `${PREFIX}-card`,\n avatar: `${PREFIX}-avatar`,\n icon: `${PREFIX}-icon`,\n switch: `${PREFIX}-switch`\n};\n\nconst Root = styled('div', {\n name: PREFIX,\n overridesResolver: (props, styles) => styles.root\n})(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',\n [`& .${SsoLoginPageClasses.card}`]: {\n minWidth: 300,\n marginTop: '6em'\n },\n [`& .${SsoLoginPageClasses.avatar}`]: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n [`& .${SsoLoginPageClasses.icon}`]: {\n backgroundColor: theme.palette.secondary[500]\n },\n [`& .${SsoLoginPageClasses.switch}`]: {\n marginBottom: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import React, { useEffect, useMemo } from 'react';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport { useTranslate, useGetIdentity } from 'react-admin';\nimport { Card, Typography } from '@mui/material';\nimport LockIcon from '@mui/icons-material/Lock';\nimport makeStyles from '@mui/styles/makeStyles';\nimport SignupForm from './SignupForm';\nimport LoginForm from './LoginForm';\nimport NewPasswordForm from './NewPasswordForm';\nimport ResetPasswordForm from './ResetPasswordForm';\nimport SimpleBox from './SimpleBox';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(() => ({\n switch: {\n marginBottom: '1em',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center'\n }\n}));\n\n/**\n * @param {object} props Props\n * @param {boolean} props.hasSignup If to show signup form.\n * @param {boolean} props.allowUsername Indicates, if login is allowed with username (instead of email).\n * @param {string} props.postSignupRedirect Location to redirect to after signup.\n * @param {string} props.postLoginRedirect Location to redirect to after login.\n * @param {object} props.additionalSignupValues\n * @param {object} props.passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst LocalLoginPage = ({\n hasSignup,\n allowUsername,\n postSignupRedirect,\n postLoginRedirect,\n additionalSignupValues,\n passwordScorer = defaultScorer\n}) => {\n const classes = useStyles();\n const navigate = useNavigate();\n const translate = useTranslate();\n const [searchParams] = useSearchParams();\n const isSignup = hasSignup && searchParams.has('signup');\n const isResetPassword = searchParams.has('reset_password');\n const isNewPassword = searchParams.has('new_password');\n const isLogin = !isSignup && !isResetPassword && !isNewPassword;\n const redirectTo = searchParams.get('redirect');\n const { identity, isLoading } = useGetIdentity();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n if (postLoginRedirect) {\n navigate(`${postLoginRedirect}?${getSearchParamsRest(searchParams)}`);\n } else if (redirectTo && redirectTo.startsWith('http')) {\n window.location.href = redirectTo;\n } else {\n navigate(redirectTo || '/');\n }\n }\n }, [identity, isLoading, navigate, searchParams, redirectTo, postLoginRedirect]);\n\n const [title, text] = useMemo(() => {\n if (isSignup) {\n return ['auth.action.signup', 'auth.helper.signup'];\n }\n if (isLogin) {\n return ['auth.action.login', 'auth.helper.login'];\n }\n if (isResetPassword) {\n return ['auth.action.reset_password', 'auth.helper.reset_password'];\n }\n if (isNewPassword) {\n return ['auth.action.set_new_password', 'auth.helper.set_new_password'];\n }\n }, [isSignup, isLogin, isResetPassword, isNewPassword]);\n\n if (isLoading || identity?.id) return null;\n\n return (\n }>\n \n {isSignup && (\n \n )}\n {isResetPassword && }\n {isNewPassword && }\n {isLogin && }\n
\n {isSignup && (\n \n {translate('auth.action.login')}\n \n )}\n {isLogin && (\n <>\n {hasSignup && (\n
\n \n {translate('auth.action.signup')}\n \n
\n )}\n
\n \n {translate('auth.action.reset_password')}\n \n
\n \n )}\n
\n
\n
\n );\n};\n\nLocalLoginPage.defaultProps = {\n hasSignup: true,\n allowUsername: false,\n additionalSignupValues: {}\n};\n\nexport default LocalLoginPage;\n","import * as React from 'react';\nimport createSlug from 'speakingurl';\nimport {\n Form,\n useTranslate,\n useNotify,\n useSafeSetState,\n TextInput,\n minLength,\n required,\n email,\n useLocaleState\n} from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport useSignup from '../../hooks/useSignup';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: 450\n },\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\n/**\n * @param postSignupRedirect\n * @param additionalSignupValues\n * @param delayBeforeRedirect\n * @param {string} redirectTo\n * @param {object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst SignupForm = ({\n passwordScorer = defaultScorer,\n postSignupRedirect,\n additionalSignupValues,\n delayBeforeRedirect\n}) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const [searchParams] = useSearchParams();\n const interactionId = searchParams.get('interaction_id');\n const redirectTo = searchParams.get('redirect');\n const [locale] = useLocaleState();\n const [password, setPassword] = React.useState('');\n\n const submit = values => {\n setLoading(true);\n signup({\n ...values,\n interactionId,\n ...additionalSignupValues\n })\n .then(() => {\n if (delayBeforeRedirect) {\n setTimeout(() => {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = postSignupRedirect\n ? `${postSignupRedirect}?${getSearchParamsRest(searchParams)}`\n : redirectTo || '/';\n setLoading(false);\n }, delayBeforeRedirect);\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = postSignupRedirect\n ? `${postSignupRedirect}?${getSearchParamsRest(searchParams)}`\n : redirectTo || '/';\n setLoading(false);\n }\n notify('auth.message.new_user_created', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'warning',\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n });\n };\n\n return (\n
\n \n \n value\n ? createSlug(value, {\n lang: locale || 'fr',\n separator: '_',\n custom: ['.', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n })\n : ''\n }\n />\n \n {passwordScorer && password && !(searchParams.has('email') && searchParams.has('force-email')) && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n \n \n )}\n setPassword(e.target.value)}\n label={translate('ra.auth.password')}\n autoComplete=\"new-password\"\n fullWidth\n disabled={loading || (searchParams.has('email') && searchParams.has('force-email'))}\n validate={[required(), validatePasswordStrength(passwordScorer)]}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.signup')\n )}\n \n \n
\n );\n};\n\nSignupForm.defaultValues = {\n redirectTo: '/',\n additionalSignupValues: {}\n};\n\nexport default SignupForm;\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import { defaultScorer } from '../../passwordScorer';\n\nconst validatePasswordStrength = (scorer = defaultScorer) => value => {\n if (!scorer) return undefined;\n const strength = scorer.scoreFn(value);\n if (strength < scorer.minRequiredScore) {\n return 'auth.input.password_too_weak';\n }\n return undefined;\n};\n\nexport default validatePasswordStrength;\n","// Inspired by https://github.com/bartlomiejzuber/password-strength-score\n\n/**\n * @typedef PasswordStrengthOptions\n * @property {number} isVeryLongLength - Required characters for a very long password (default: 12)\n * @property {number} isLongLength - Required characters for a long password (default: 6)\n * @property {number} isVeryLongScore - Score for a very long password (default: 2.5)\n * @property {number} isLongScore - Score for a long password (default: 1.5)\n * @property {number} uppercaseScore - Score for a password with uppercase letters (default: 1)\n * @property {number} lowercaseScore - Score for a password with lowercase letters (default: 1)\n * @property {number} numbersScore - Score for a password with numbers (default: 1)\n * @property {number} nonAlphanumericsScore - Score for a password without non-alphanumeric characters (default: 1)\n */\n\n/** @type {PasswordStrengthOptions} */\nexport const defaultOptions = {\n isVeryLongLength: 14,\n isLongLength: 8,\n isLongScore: 2,\n isVeryLongScore: 4,\n uppercaseScore: 1,\n lowercaseScore: 1,\n numbersScore: 1,\n nonAlphanumericsScore: 1\n};\n\n/**\n *\n * @param {string} password Password text.\n * @param {PasswordStrengthOptions} options Password options.\n * @returns {number} The password strength score.\n */\nexport const passwordStrength = (password, options) => {\n if (!password) {\n return 0;\n }\n\n const mergedOptions = { ...defaultOptions, ...options };\n\n const longScore = (password.length >= mergedOptions.isLongLength && mergedOptions.isLongScore) || 0;\n const veryLongScore = (password.length >= mergedOptions.isVeryLongLength && mergedOptions.isVeryLongScore) || 0;\n const lowercaseScore = (/[a-z]/.test(password) && mergedOptions.lowercaseScore) || 0;\n const uppercaseScore = (/[A-Z]/.test(password) && mergedOptions.uppercaseScore) || 0;\n const numbersScore = (/\\d/.test(password) && mergedOptions.numbersScore) || 0;\n const nonalphasScore = (/\\W/.test(password) && mergedOptions.nonAlphanumericsScore) || 0;\n\n return uppercaseScore + lowercaseScore + numbersScore + nonalphasScore + longScore + veryLongScore;\n};\n\nexport const createPasswordScorer = (options = defaultOptions, minRequiredScore = 5) => {\n const mergedOptions = { ...defaultOptions, ...options };\n\n return {\n scoreFn: password => passwordStrength(password, mergedOptions),\n minRequiredScore,\n maxScore:\n mergedOptions.uppercaseScore +\n mergedOptions.lowercaseScore +\n mergedOptions.numbersScore +\n mergedOptions.nonAlphanumericsScore +\n mergedOptions.isLongScore +\n mergedOptions.isVeryLongScore\n };\n};\n\nexport const defaultScorer = createPasswordScorer(defaultOptions, 5);\n","import React from 'react';\nimport ColorGradientProgressBar from './ColorGradientProgressBar';\nimport { defaultScorer } from '../../passwordScorer';\n\nexport default function PasswordStrengthIndicator({ scorer = defaultScorer, password, ...restProps }) {\n const strength = scorer.scoreFn(password);\n return ;\n}\n","import React from 'react';\nimport { LinearProgress } from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\n/**\n * @typedef {object} Color\n * @property {number} red\n * @property {number} green\n * @property {number} blue\n */\n\n/**\n * Calculate a rgb-color from a gradient between `color1` and `color2`\n * @param {number} fade - Indicates the fade between `color1` and `color2` in the range [0, 1].\n * @param {Color} color1\n * @param {Color} color2\n * @returns {string} `` `rgb(${red}, ${green}, ${blue})` ``\n */\nconst colorGradient = (fade, color1, color2) => {\n const diffRed = color2.red - color1.red;\n const diffGreen = color2.green - color1.green;\n const diffBlue = color2.blue - color1.blue;\n\n const gradient = {\n red: Math.floor(color1.red + diffRed * fade),\n green: Math.floor(color1.green + diffGreen * fade),\n blue: Math.floor(color1.blue + diffBlue * fade)\n };\n\n return `rgb(${gradient.red},${gradient.green},${gradient.blue})`;\n};\n\n/**\n * A progress bar that changes its color between its min an max value.\n * @param {object} props\n * @param {Color} [props.badColor] - default: `#FF4047`\n * @param {Color} [props.goodColor] - default: `#00FF6E`\n * @param {number} props.maxVal\n * @param {number} props.minVal\n * @param {number} props.currentVal\n */\nexport default function ColorGradientProgressBar(props) {\n const { minVal, maxVal, currentVal, badColor, goodColor, ...restProps } = props;\n\n const color1 = badColor || { red: 0xff, green: 0x40, blue: 0x47 };\n const color2 = goodColor || { red: 0x00, green: 0xff, blue: 0x6e };\n\n const fade = Math.max(0, Math.min(1, (currentVal - minVal) / (maxVal - minVal)));\n const currentColor = colorGradient(fade, color1, color2);\n\n const StyledLinearProgress = withStyles({\n colorPrimary: {\n backgroundColor: 'black' // '#e0e0e0'\n },\n barColorPrimary: {\n backgroundColor: currentColor\n }\n })(LinearProgress);\n\n return ;\n}\n","const USED_SEARCH_PARAMS = ['signup', 'reset_password', 'new_password', 'email', 'force-email'];\n\nconst getSearchParamsRest = searchParams => {\n const rest = [];\n for (const [key, value] of searchParams.entries()) {\n if (!USED_SEARCH_PARAMS.includes(key)) {\n rest.push(`${key}=${encodeURIComponent(value)}`);\n }\n }\n return rest.length > 0 ? rest.join('&') : '';\n};\n\nexport default getSearchParamsRest;\n","import * as React from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, TextInput, required, email, useLogin } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport getSearchParamsRest from './getSearchParamsRest';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: 450\n },\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\nconst LoginForm = ({ postLoginRedirect, allowUsername }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const login = useLogin();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const redirectTo = postLoginRedirect\n ? `${postLoginRedirect}?${getSearchParamsRest(searchParams)}`\n : searchParams.get('redirect');\n const interactionId = searchParams.get('interaction_id');\n\n const submit = values => {\n setLoading(true);\n login({ ...values, redirectTo, interactionId })\n .then(() => {\n setLoading(false);\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n validate={allowUsername ? [required()] : [required(), email()]}\n />\n \n \n {loading ? (\n \n ) : (\n translate('auth.action.login')\n )}\n \n \n
\n );\n};\n\nLoginForm.defaultValues = {\n redirectTo: '/',\n allowUsername: false\n};\n\nexport default LoginForm;\n","import React, { useState } from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, CircularProgress, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport { defaultScorer } from '../../passwordScorer';\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\n/**\n *\n * @param {string} redirectTo\n * @param {Object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }) => {\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const token = searchParams.get('token');\n\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n\n const [newPassword, setNewPassword] = useState('');\n\n const submit = values => {\n setLoading(true);\n authProvider\n .setNewPassword({ ...values, token })\n .then(res => {\n setTimeout(() => {\n window.location.href = `/login${redirectTo ? `?redirect=${encodeURIComponent(redirectTo)}` : ''}`;\n setLoading(false);\n }, 2000);\n notify('auth.notification.password_changed', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n {passwordScorer && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n\n \n \n )}\n setNewPassword(e.target.value)}\n />\n \n \n {loading ? (\n \n ) : (\n translate('auth.action.set_new_password')\n )}\n \n \n
\n );\n};\n\nexport default NewPasswordForm;\n","import React from 'react';\nimport { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin';\nimport { Button, CardContent, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n icon: {\n margin: theme.spacing(0.3)\n }\n}));\n\nconst ResetPasswordForm = () => {\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n\n const submit = values => {\n setLoading(true);\n authProvider\n .resetPassword({ ...values })\n .then(res => {\n setLoading(false);\n notify('auth.notification.reset_password_submitted', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n \n {loading ? (\n \n ) : (\n translate('auth.action.reset_password')\n )}\n \n \n
\n );\n};\n\nexport default ResetPasswordForm;\n","import React from 'react';\nimport { Box, Card, Typography } from '@mui/material';\nimport { Notification } from 'react-admin';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.secondary.main\n }\n },\n root: {\n backgroundColor: theme.palette.secondary.main\n },\n card: {\n minWidth: 300,\n maxWidth: 500,\n marginTop: '6em',\n [theme.breakpoints.down('sm')]: {\n margin: '1em'\n }\n },\n icon: {\n marginTop: 5,\n marginRight: 5\n },\n title: {\n [theme.breakpoints.down('sm')]: {\n fontWeight: 'bold',\n marginTop: 12\n }\n }\n}));\n\nconst SimpleBox = ({ title, icon, text, children }) => {\n const classes = useStyles();\n return (\n \n \n \n {icon && React.cloneElement(icon, { fontSize: 'large', className: classes.icon })}\n \n {title}\n \n \n \n {text}\n \n {children}\n \n \n \n );\n};\n\nexport default SimpleBox;\n","import React from 'react';\nimport { Resource, usePermissions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport { rightsToCreate } from '../constants';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissions(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef, useCallback } from 'react';\nimport { Logout, UserMenu as RaUserMenu, useGetIdentity, useTranslate, useUserMenu } from 'react-admin';\nimport { MenuItem, ListItemIcon, ListItemText } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useNavigate } from 'react-router-dom';\n\n// It's important to pass the ref to allow Material UI to manage the keyboard navigation\nconst UserMenuItem = forwardRef(({ label, icon, to, ...rest }, ref) => {\n const { onClose } = useUserMenu();\n const translate = useTranslate();\n const navigate = useNavigate();\n const onClick = useCallback(() => {\n navigate(to);\n onClose();\n }, [to, onClose, navigate]);\n return (\n \n {icon && {React.cloneElement(icon, { fontSize: 'small' })}}\n {translate(label)}\n \n );\n});\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { identity } = useGetIdentity();\n return (\n \n {identity && identity.id !== ''\n ? [\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}/show`}\n />,\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}`}\n />,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n logout: ,\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import React, { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = message => {\n const { identity, isLoading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!isLoading && !identity?.id) {\n notify(message || 'ra.auth.auth_check_error', { type: 'error' });\n redirect(`/login?redirect=${encodeURIComponent(location.pathname + location.search)}`);\n }\n }, [isLoading, identity, redirect, notify, location]);\n\n return { identity, isLoading };\n};\n\nexport default useCheckAuthenticated;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n permissions: 'Permissions',\n signup: 'Signup',\n reset_password: 'Reset password',\n set_new_password: 'Set new password',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address',\n current_password: 'Current password',\n new_password: 'New password',\n confirm_new_password: 'Confirm new password',\n password_strength: 'Password strength',\n password_too_weak: 'Password too weak. Increase length or add special characters.'\n },\n helper: {\n login: 'Sign in to your account',\n signup: 'Create your account',\n reset_password: 'Enter your email address below and we will send you a link to reset your password',\n set_new_password: 'Please enter your email address and a new password below'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n unable_to_fetch_user_data: 'Unable to fetch user data',\n no_token_returned: 'No token returned',\n invalid_token_returned: 'Invalid token returned',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider:\n 'Please choose a POD provider in the list below. All application data will be saved on your POD.'\n },\n notification: {\n reset_password_submitted: 'An email has been sent with reset password instructions',\n reset_password_error: 'An error occurred',\n password_changed: 'Password changed successfully',\n new_password_error: 'An error occurred',\n invalid_password: 'Invalid password',\n get_settings_error: 'An error occurred',\n update_settings_error: 'An error occurred'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la ressource',\n login_required: 'Connexion requise'\n },\n action: {\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n reset_password: 'Mot de passe oublié ?',\n set_new_password: 'Définir le mot de passe',\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail',\n current_password: 'Mot de passe actuel',\n new_password: 'Nouveau mot de passe',\n confirm_new_password: 'Confirmer le nouveau mot de passe',\n password_strength: 'Force du mot de passe',\n password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.'\n },\n helper: {\n login: 'Connectez-vous à votre compte.',\n signup: 'Créez votre compte',\n reset_password:\n 'Entrez votre adresse mail ci-dessous et nous vous enverrons un lien pour réinitialiser votre mot de passe',\n set_new_password: 'Veuillez entrer votre adresse mail et un nouveau mot de passe ci-dessous'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n unable_to_fetch_user_data: 'Impossible de récupérer les données du profil',\n no_token_returned: 'Aucun token a été retourné',\n invalid_token_returned: 'Token invalide',\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider:\n \"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD.\"\n },\n notification: {\n reset_password_submitted: 'Un e-mail a été envoyé avec les instructions de réinitialisation du mot de passe',\n reset_password_error: \"Une erreur s'est produite\",\n password_changed: 'Le mot de passe a été changé avec succès',\n new_password_error: \"Une erreur s'est produite\",\n invalid_password: 'Mot de passe incorrect',\n get_settings_error: \"Une erreur s'est produite\",\n update_settings_error: \"Une erreur s'est produite\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":[],"version":3,"file":"index.es.js.map"} \ No newline at end of file diff --git a/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js b/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js index 7b4648d41..1f31c656a 100644 --- a/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js +++ b/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js @@ -97,7 +97,6 @@ const NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }) => { disabled={loading} validate={[required(), validatePasswordStrength(passwordScorer)]} onChange={e => setNewPassword(e.target.value)} - format={value => (value ? value.toLowerCase() : '')} /> { fullWidth disabled={loading} validate={required()} - format={value => (value ? value.toLowerCase() : '')} />