Skip to content

fix(graph): translate sharing roles consistently#2935

Merged
rhafer merged 1 commit into
opencloud-eu:mainfrom
rhafer:issue/2800
Jun 12, 2026
Merged

fix(graph): translate sharing roles consistently#2935
rhafer merged 1 commit into
opencloud-eu:mainfrom
rhafer:issue/2800

Conversation

@rhafer

@rhafer rhafer commented Jun 11, 2026

Copy link
Copy Markdown
Member

GetRoleDefinition/s does now handle l10n correctly. Previsouly it just returned the non-localized string. What made things worse was that ListPermissions() mutated global list of available roles and replaced some strings with translated values depending on the accept-language header. Which resulted in GetRoleDefinition returning results in mixed localization depending on who/what called ListPermissions before.

Fixes: #2800

GetRoleDefinition/s does now handle l10n correctly. Previsouly it just
returned the non-localized string. What made things worse was that
ListPermissions() mutated global list of available roles and replaced
some strings with translated values depending on the `accept-language`
header. Which resulted in GetRoleDefinition returning results in mixed
localization depending on who/what called ListPermissions before.

Fixes: opencloud-eu#2800
@codacy-production

codacy-production Bot commented Jun 11, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 14 complexity · 19 duplication

Metric Results
Complexity 14
Duplication 19

View in Codacy

🟢 Coverage 91.67% diff coverage · +0.06% coverage variation

Metric Results
Coverage variation +0.06% coverage variation (-1.00%)
Diff coverage 91.67% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (3c0d709) 82022 18842 22.97%
Head commit (d163c8e) 82038 (+16) 18898 (+56) 23.04% (+0.06%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2935) 36 33 91.67%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@rhafer rhafer mentioned this pull request Jun 11, 2026
2 tasks
@rhafer rhafer changed the title fix(graph): translate sharing roles consitently fix(graph): translate sharing roles consistently Jun 11, 2026
@rhafer rhafer requested review from aduffeck and dragonchaser June 11, 2026 12:42

@micbar micbar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@micbar micbar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@rhafer rhafer merged commit 490eb58 into opencloud-eu:main Jun 12, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharing Roles will not be translated

2 participants