mirror of
https://github.com/sasjs/server.git
synced 2025-12-12 03:54:34 +00:00
fix: spelling issues
This commit is contained in:
@@ -128,7 +128,7 @@ CA_ROOT=fullchain.pem (optional)
|
|||||||
## ENV variables required for MODE: `server`
|
## ENV variables required for MODE: `server`
|
||||||
DB_CONNECT=mongodb+srv://<DB_USERNAME>:<DB_PASSWORD>@<CLUSTER>/<DB_NAME>?retryWrites=true&w=majority
|
DB_CONNECT=mongodb+srv://<DB_USERNAME>:<DB_PASSWORD>@<CLUSTER>/<DB_NAME>?retryWrites=true&w=majority
|
||||||
|
|
||||||
# AUTH_PROVIDERS options: [ldap|internal] default: `internal`
|
# AUTH_PROVIDERS options: [ldap] default: ``
|
||||||
AUTH_PROVIDERS=
|
AUTH_PROVIDERS=
|
||||||
|
|
||||||
## ENV variables required for AUTH_MECHANISM: `ldap`
|
## ENV variables required for AUTH_MECHANISM: `ldap`
|
||||||
|
|||||||
@@ -641,9 +641,9 @@ paths:
|
|||||||
-
|
-
|
||||||
bearerAuth: []
|
bearerAuth: []
|
||||||
parameters: []
|
parameters: []
|
||||||
/SASjsApi/authConfig/synchronizeWithLDAP:
|
/SASjsApi/authConfig/synchroniseWithLDAP:
|
||||||
post:
|
post:
|
||||||
operationId: SynchronizeWithLDAP
|
operationId: SynchroniseWithLDAP
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Ok
|
description: Ok
|
||||||
@@ -660,7 +660,7 @@ paths:
|
|||||||
examples:
|
examples:
|
||||||
'Example 1':
|
'Example 1':
|
||||||
value: {users: 5, groups: 3}
|
value: {users: 5, groups: 3}
|
||||||
summary: 'Synchronizes LDAP users and groups with internal DB and returns the count of imported users and groups.'
|
summary: 'Synchronises LDAP users and groups with internal DB and returns the count of imported users and groups.'
|
||||||
tags:
|
tags:
|
||||||
- Auth_Config
|
- Auth_Config
|
||||||
security:
|
security:
|
||||||
|
|||||||
@@ -30,20 +30,20 @@ export class AuthConfigController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary Synchronizes LDAP users and groups with internal DB and returns the count of imported users and groups.
|
* @summary Synchronises LDAP users and groups with internal DB and returns the count of imported users and groups.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Example({
|
@Example({
|
||||||
users: 5,
|
users: 5,
|
||||||
groups: 3
|
groups: 3
|
||||||
})
|
})
|
||||||
@Post('/synchronizeWithLDAP')
|
@Post('/synchroniseWithLDAP')
|
||||||
public async synchronizeWithLDAP() {
|
public async synchroniseWithLDAP() {
|
||||||
return synchronizeWithLDAP()
|
return synchroniseWithLDAP()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const synchronizeWithLDAP = async () => {
|
const synchroniseWithLDAP = async () => {
|
||||||
process.logger.info('Syncing LDAP with internal DB')
|
process.logger.info('Syncing LDAP with internal DB')
|
||||||
|
|
||||||
const permissions = await Permission.get({})
|
const permissions = await Permission.get({})
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ authConfigRouter.get('/', async (req, res) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
authConfigRouter.post('/synchronizeWithLDAP', async (req, res) => {
|
authConfigRouter.post('/synchroniseWithLDAP', async (req, res) => {
|
||||||
const controller = new AuthConfigController()
|
const controller = new AuthConfigController()
|
||||||
try {
|
try {
|
||||||
const response = await controller.synchronizeWithLDAP()
|
const response = await controller.synchroniseWithLDAP()
|
||||||
res.send(response)
|
res.send(response)
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
res.status(500).send(err.toString())
|
res.status(500).send(err.toString())
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ const AuthConfig = () => {
|
|||||||
.finally(() => setIsLoading(false))
|
.finally(() => setIsLoading(false))
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const synchronizeWithLDAP = () => {
|
const synchroniseWithLDAP = () => {
|
||||||
setIsLoading(true)
|
setIsLoading(true)
|
||||||
axios
|
axios
|
||||||
.post(`/SASjsApi/authConfig/synchronizeWithLDAP`)
|
.post(`/SASjsApi/authConfig/synchroniseWithLDAP`)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const { userCount, groupCount } = res.data
|
const { userCount, groupCount } = res.data
|
||||||
toast.success(
|
toast.success(
|
||||||
@@ -137,9 +137,9 @@ const AuthConfig = () => {
|
|||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
onClick={synchronizeWithLDAP}
|
onClick={synchroniseWithLDAP}
|
||||||
>
|
>
|
||||||
Synchronize
|
Synchronise
|
||||||
</Button>
|
</Button>
|
||||||
</CardActions>
|
</CardActions>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
Reference in New Issue
Block a user