mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 21:11:14 +00:00
Managed mode: hand place search, routing, plugins and docs to the operator
On a managed install the operator runs place search and routing, the plugin runtime, the integrations and the documentation, so the admin and the users no longer see switches and guides for them: - The place search and routing card, the transit provider and the search log are gone from the admin settings (desktop and mobile). places_provider is a managed-locked setting, and the transit provider, search log and wanderer routes refuse writes there. Share place details stays the admin's, as a card of its own, hidden when TREK_PLACES_CONTRIBUTE switches it off. - File types and trip reminders move to the right column, so the columns stay balanced. - Plugins disappear from the admin and the user settings, wanderer from Tours. - The Help & Docs page and its links are not offered. The help center stays and leaves out guides about what the operator runs (keys, OIDC, backups, storage, releases, plugins, document sync) and about integrations that are off. - Mapbox GL is offered only with the operator's token, Amap tiles only where the operator set Amap up. - The mobile admin no longer shows OIDC and the WebAuthn relying party fields, matching the desktop tab. For every install: - Notification matrices list only events the install can raise: no plugin row without the plugin runtime, no Vacay, collection, photo, Synology, wanderer or packing rows while those are off. On a managed install the release and replica alerts are left out. - The journey entry editor offers External photos only where a photo provider is switched on, as the phone already did. - app-config is asked again after a failed answer. A page opened while the server restarted kept every default for the session, which on a managed install brought back the operator's settings.
This commit is contained in:
@@ -293,6 +293,7 @@ export class AdminController {
|
||||
|
||||
@Put('tours-wanderer')
|
||||
@ResponseContract(adminFeatureToggleResponseSchema)
|
||||
@ManagedForbidden('wanderer sends searches to a server the user picks, which the operator has not agreed to')
|
||||
async updateToursWanderer(@CurrentUser() user: User, @Body() body: AdminFeatureToggleDto, @Req() req: Request) {
|
||||
const result = await this.addons.updateToursWanderer(body.enabled);
|
||||
await this.audit.writeAudit({
|
||||
@@ -418,6 +419,7 @@ export class AdminController {
|
||||
}
|
||||
|
||||
@Put('place-shadow')
|
||||
@ManagedForbidden('place search belongs to the operator on a managed install')
|
||||
async updatePlaceShadow(@CurrentUser() user: User, @Body() body: AdminFeatureToggleDto, @Req() req: Request) {
|
||||
const result = await this.addons.updatePlaceShadow(body.enabled);
|
||||
await this.audit.writeAudit({
|
||||
@@ -491,6 +493,7 @@ export class AdminController {
|
||||
}
|
||||
|
||||
@Put('transit-provider')
|
||||
@ManagedForbidden('routing belongs to the operator on a managed install')
|
||||
async updateTransitProvider(@CurrentUser() user: User, @Body() body: AdminTransitProviderDto, @Req() req: Request) {
|
||||
const result = await this.addons.updateTransitProvider(body.provider, user.id);
|
||||
await this.audit.writeAudit({
|
||||
|
||||
Reference in New Issue
Block a user