Skip to content

Add user-private links feature#3

Open
amalg wants to merge 3 commits intoLexioJ:mainfrom
amalg:main
Open

Add user-private links feature#3
amalg wants to merge 3 commits intoLexioJ:mainfrom
amalg:main

Conversation

@amalg
Copy link

@amalg amalg commented Feb 10, 2026

Summary

This PR adds the ability for users to create their own personal dashboard links that are visible only to them. The feature includes an admin toggle to enable/disable it, and is disabled by default for a conservative deployment approach.

Key Features

  • User-private links: Users can create personal links visible only to themselves
  • Admin control: Toggle to enable/disable the feature globally (disabled by default)
  • Configurable limit: Admins can set max links per user (1-50, default 10)
  • Personal settings page: Users manage their links in Settings > DashLink
  • Separate icon storage: User icons stored in user_icons/{userId}/ subfolder
  • Dashboard integration: Admin links display first, then user links (max 10 total)
  • Full functionality: CRUD, import/export, drag-drop reorder for user links
  • Security: Rate limiting on link creation (20/hour) and import (3/hour)

Database Changes

New migration adds user_id column to dashlink_links table:

  • NULL = admin/global link (existing behavior)
  • Non-NULL = user's private link

New Files

Backend (PHP)

  • lib/Migration/Version002Date20250210000000.php - Database migration
  • lib/Service/UserLinkService.php - User link business logic
  • lib/Controller/UserLinkController.php - REST API for user links
  • lib/Settings/Personal.php - Personal settings page
  • lib/Settings/PersonalSection.php - Settings section registration

Frontend (Vue.js)

  • src/personal.js - Entry point for personal settings
  • src/composables/useUserLinks.js - API composable for user links
  • src/components/PersonalPanel.vue - Personal settings UI
  • src/components/UserLinkForm.vue - Link form (simplified, no group picker)
  • src/components/UserIconUploader.vue - Icon uploader for user links

Templates

  • templates/personal.php - Personal settings mount point
  • templates/personal-disabled.php - Shown when feature is disabled

API Endpoints Added

All user endpoints require authentication but not admin access:

Method Endpoint Description
GET /api/v1/user/links List user's links
POST /api/v1/user/links Create link
PUT /api/v1/user/links/{id} Update link
DELETE /api/v1/user/links/{id} Delete link
POST /api/v1/user/links/{id}/icon Upload icon
DELETE /api/v1/user/links/{id}/icon Delete icon
GET /api/v1/user/links/{id}/icon Get icon
PUT /api/v1/user/links/order Update order
GET /api/v1/user/links/export Export to JSON
POST /api/v1/user/links/import Import from JSON

Admin Settings

New options in Admin Settings > DashLink:

  • Toggle: "Allow users to create personal links"
  • Input: "Maximum links per user" (shown when enabled)

Test Plan

  • Enable feature in admin panel
  • As regular user, navigate to Personal Settings > DashLink
  • Create a link with icon, verify it appears
  • Verify link appears in dashboard after admin links
  • Verify another user cannot see the link
  • Disable feature in admin panel
  • Verify Personal Settings > DashLink section disappears
  • Verify user links no longer appear in dashboard
  • Re-enable feature, verify links are restored
  • Test link limit enforcement
  • Test import/export for user links

amalg and others added 3 commits February 10, 2026 12:53
- Allow users to create personal dashboard links visible only to them
- Admin toggle to enable/disable user links feature
- Configurable limit per user (1-50 links, default 10)
- User icons stored separately in user_icons/{userId}/ folder
- Personal settings page in user settings
- Dashboard shows admin links first, then user links (max 10 total)
- Full CRUD, import/export, and drag-drop reorder for user links
- Rate limiting for user link creation and import

New files:
- lib/Migration/Version002Date20250210000000.php
- lib/Service/UserLinkService.php
- lib/Controller/UserLinkController.php
- lib/Settings/Personal.php
- lib/Settings/PersonalSection.php
- templates/personal.php
- templates/personal-disabled.php
- src/personal.js
- src/composables/useUserLinks.js
- src/components/PersonalPanel.vue
- src/components/UserLinkForm.vue
- src/components/UserIconUploader.vue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Admins must explicitly enable user links in settings after deployment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the opacity:0 style on hover that was causing link cards to
appear blank/white when hovering. The drop shadow lift effect is
preserved while keeping the card content visible.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant