Skip to content

Office settings page opens for users without the font management permission #4388

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

The Office settings page (/admin-settings/office, font management for Collabora) opens for every logged-in user. A regular user gets the admin sidebar with "Office", "Manage Fonts", "Upload files" and Delete buttons. The server rejects the writes (403, it checks Collaboration.Fonts.Manage), so it's no security hole, but the page shouldn't be reachable or shown without the permission.

The other admin settings routes redirect users without the permission via beforeEnter + $ability.can('read-all', …) (packages/web-app-admin-settings/src/index.ts). The office settings route in packages/web-app-office-settings/src/index.ts only sets authContext: 'user' and its nav item is isVisible: () => true. There's also no ability for Collaboration.Fonts.Manage.all in packages/web-runtime/src/services/auth/abilities.ts yet, so there's nothing to check against. Only relevant when office-settings is in the web config's apps list.

Reproduction Steps

  1. Enable the office-settings app in the web config
  2. Log in as a regular user (role User)
  3. Open /admin-settings/office
  4. Upload a font or click Delete on one

Expected Outcome

Like the other admin settings pages: a user without the permission is redirected and doesn't see the "Office" nav item.

Actual Outcome

The page opens. Upload (POST /collaboration/fonts/manage/) and Delete (DELETE /collaboration/fonts/manage/<file>) get a 403 and show "Failed to update fonts" / "Failed to delete font".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions