mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-26 13:54:56 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1efdd2c1a | ||
|
|
8bc4e5ee94 |
@@ -108,6 +108,18 @@ describe('PermissionsService', () => {
|
||||
actionKey: 'View', // PermissionAction.View
|
||||
typeKey: 'Document', // PermissionType.Document
|
||||
})
|
||||
expect(
|
||||
permissionsService.getPermissionKeys('view_global_statistics')
|
||||
).toEqual({
|
||||
actionKey: 'View', // PermissionAction.View
|
||||
typeKey: 'GlobalStatistics', // PermissionType.GlobalStatistics
|
||||
})
|
||||
expect(
|
||||
permissionsService.getPermissionKeys('view_system_monitoring')
|
||||
).toEqual({
|
||||
actionKey: 'View', // PermissionAction.View
|
||||
typeKey: 'SystemMonitoring', // PermissionType.SystemMonitoring
|
||||
})
|
||||
})
|
||||
|
||||
it('correctly checks explicit global permissions', () => {
|
||||
|
||||
@@ -110,19 +110,16 @@ export class PermissionsService {
|
||||
actionKey: string
|
||||
typeKey: string
|
||||
} {
|
||||
const matches = permissionStr.match(/(.+)_/)
|
||||
let typeKey
|
||||
let actionKey
|
||||
if (matches?.length > 0) {
|
||||
const action = matches[1]
|
||||
const actionIndex = Object.values(PermissionAction).indexOf(
|
||||
action as PermissionAction
|
||||
)
|
||||
if (actionIndex > -1) {
|
||||
actionKey = Object.keys(PermissionAction)[actionIndex]
|
||||
}
|
||||
const actionIndex = Object.values(PermissionAction).findIndex((action) =>
|
||||
permissionStr.startsWith(`${action}_`)
|
||||
)
|
||||
if (actionIndex > -1) {
|
||||
const action = Object.values(PermissionAction)[actionIndex]
|
||||
actionKey = Object.keys(PermissionAction)[actionIndex]
|
||||
const typeIndex = Object.values(PermissionType).indexOf(
|
||||
permissionStr.replace(action, '%s') as PermissionType
|
||||
permissionStr.replace(`${action}_`, '%s_') as PermissionType
|
||||
)
|
||||
if (typeIndex > -1) {
|
||||
typeKey = Object.keys(PermissionType)[typeIndex]
|
||||
|
||||
@@ -2520,7 +2520,7 @@
|
||||
<context context-type="sourcefile">src/app/components/admin/tasks/tasks.component.ts</context>
|
||||
<context context-type="linenumber">77</context>
|
||||
</context-group>
|
||||
<target state="translated">LLM-Index</target>
|
||||
<target state="translated">LLM-Indizierung</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6402092370576716734" datatype="html" approved="yes">
|
||||
<source>Empty Trash</source>
|
||||
|
||||
@@ -3,7 +3,7 @@ msgstr ""
|
||||
"Project-Id-Version: paperless-ngx\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-07-25 07:12+0000\n"
|
||||
"PO-Revision-Date: 2026-07-25 07:14\n"
|
||||
"PO-Revision-Date: 2026-07-26 12:32\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: German\n"
|
||||
"Language: de_DE\n"
|
||||
|
||||
Reference in New Issue
Block a user