mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-11 21:11:57 +00:00
Forbid export attempt for readonly users (#9181)
This commit is contained in:
parent
25272e3431
commit
95a2ba3aed
@ -181,8 +181,13 @@ export function createServer (storageConfig: StorageConfiguration): { app: Expre
|
||||
throw new ApiError(400, 'Missing required parameters')
|
||||
}
|
||||
|
||||
const decodedToken = decodeToken(token)
|
||||
if (decodedToken.extra?.readonly !== undefined) {
|
||||
throw new ApiError(403, 'Forbidden')
|
||||
}
|
||||
|
||||
const platformClient = await createPlatformClient(token)
|
||||
const { account } = decodeToken(token)
|
||||
const account = decodedToken.account
|
||||
|
||||
const txOperations = new TxOperations(platformClient, socialId)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user