mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-30 10:47:17 +00:00
test: migration from Python to JavaScript
This commit is contained in:
@@ -47,6 +47,13 @@ class TestUtility {
|
||||
return s;
|
||||
}
|
||||
|
||||
camelCase(snakeCase) {
|
||||
return snakeCase.replace(/(?:^\w|[A-Z]|\b\w)/g, (char, i) =>
|
||||
i === 0 ? char.toLowerCase() : char.toUpperCase(),
|
||||
)
|
||||
.replace(/[\s\-_]+/g, '')
|
||||
}
|
||||
|
||||
setupRights(resource, username, rights) {
|
||||
const action = (typeof rights == 'undefined') ? 'remove-user' : 'set-roles'
|
||||
return davRequest({
|
||||
|
||||
Reference in New Issue
Block a user