Commit graph

36 commits

Author SHA1 Message Date
Peter Goodhall
e7045f3d5a Support varying slp permission column names
Add get_slp_permission_column() to detect and cache the permission column name in station_logbooks_permissions (checks permission_level, access_level, then falls back to legacy permission). Replace hardcoded slp.permission_level references with the resolved column (aliasing to permission_level where needed) across show_all(), public_slugs_accessible_by_user(), check_logbook_is_accessible(), get_user_permission(), add_user_to_logbook(), and list_logbook_collaborators() to avoid failures on partially migrated databases.
2026-05-21 16:12:22 +01:00
Peter Goodhall
aaf3aa85a6 Add API endpoint for accessible public slugs
Introduce API method logbook_public_slugs_accessible($key) that authorizes the API key, updates last-used timestamp, and returns JSON of all station logbooks (owned or shared) that have non-empty public slugs for the key owner. Add Logbooks_model::public_slugs_accessible_by_user($user_id) to select matching logbooks, label access_level as "owner" for owners or the stored permission_level for shared entries, and order results by logbook_name. Endpoint returns 401 for missing/invalid keys and a success payload with status, count, and logbooks on success.
2026-04-03 22:35:25 +01:00
Peter Goodhall
78209d497b Add API endpoint for logbook public slugs
Introduce GET /api/logbook_public_slugs/{key} in the API controller to return a JSON list of the API key owner's station logbooks that have non-empty public slugs. The endpoint authorizes the key, updates last-used timestamp, responds with 401 for missing/invalid keys or 200 with status, count and logbook entries. Add Logbooks_model::public_slugs_by_user to query station_logbooks for non-null/non-empty public_slug values ordered by logbook_name.
2026-04-03 22:00:35 +01:00
Peter Goodhall
2cb8d62860 Add gridsquare prefix index and optimizations
Bump migration version and add a new migration (246) to create/drop a 4-char prefix index on COL_GRIDSQUARE to speed LIKE queries; migration 245 now also drops the prefix index if present. Add Stations::user_owns_station and use it in Logbookadvanced_model to avoid N+1 station lookups. Add caching to Logbooks_model::list_logbook_relationships to prevent redundant queries. Optimize Oqrs_model queries to select only needed columns for several methods. Add Stats::getUniqueCallsignsConsolidated to combine multiple unique-callsign groupings into a single set of queries for better performance. Database debug toggles added where appropriate.
2026-02-11 11:09:39 +00:00
Peter Goodhall
a5dc268b72 Handle unauthenticated user in Logbooks_model queries
Added checks to return empty results when no user is logged in, preventing SQL errors and ensuring consistent behavior for unauthenticated access in logbook-related queries.
2025-11-23 10:57:27 +00:00
Peter Goodhall
476b59abc4 Add logbook sharing email notification
Introduces email notifications when a logbook is shared with a new user, including a new email template and improved error logging for email sending. Also enhances the test email UI with a loading spinner and updates error messages for better clarity.
2025-11-22 15:09:44 +00:00
Peter Goodhall
f2b8a3eeaa Redirect to edit page after logbook creation
After creating a new logbook, users are now redirected to the edit page for the newly created logbook instead of the logbooks list. The add method in Logbooks_model now returns the new logbook ID to support this change.
2025-11-22 14:38:53 +00:00
Peter Goodhall
b287af642b Add multi-user logbook sharing and permissions
Introduces logbook sharing with read, write, and admin permission levels via a new station_logbooks_permissions table and related migration. Updates controllers, models, and views to support managing collaborators, restricts sensitive actions to owners/admins, and adds UI for sharing management. Also adds user lookup by callsign and improves logbook/station location access logic.
2025-11-19 15:37:34 +00:00
Peter Goodhall
5ff5e12890 Add public radio status option to logbooks
Introduces a new 'public_radio_status' field to station logbooks, allowing users to enable or disable the display of radio status on public logbook pages. Updates migration, controllers, model, views, and language files to support this feature and provide UI controls for toggling the option.
2025-08-22 14:52:07 +01:00
phl0
e2ef6c2b20
Add logbook setting for public search 2023-07-10 17:11:40 +02:00
phl0
c57932be86
Make stats publicly usable with API key 2023-04-27 21:08:09 +02:00
phl0
fc12664da8
Add deleted DXCC badge to linked station profiles 2023-04-27 09:47:09 +02:00
phl0
5d6abd1fd3
Remove redundant country colum in station_profile
Squashed commit of the following:

commit 29e5f5118a1c3f8deb623e5948c3b7602241792d
Merge: 566b390d e0a04cbe
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 23:28:31 2023 +0200

    Merge remote-tracking branch 'upstream/dev' into removeRedundantDxccNames

commit 566b390d8b0322b32f4438994354ce902010c0d4
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 23:18:28 2023 +0200

    Refactor reassign function to use DXCC name from dxcc_entities

commit 2e50b34c1bdb9bb087e0e0d16f13c340c15588fb
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 22:05:12 2023 +0200

    Use DXCC name from DXCC entities upon import

commit d2b1d895818777747db593848b855819f53ffe6d
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 21:18:53 2023 +0200

    Add DB migration script

commit 0ecf4b8d9cf0253c1f818a252f7ae83722254544
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 18:16:55 2023 +0200

    Fix export function for requests QSLs

commit 51d2c5c6175a8e8c69b9edd57d6f1e95c4a03600
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 17:53:50 2023 +0200

    Fix webadif/qrz upload

commit 45039a6b1284d1a23f610fc70a39ef25ce720cab
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 17:32:40 2023 +0200

    Fix lotw_export function

commit 1306225d027cacbe70e510fd0fc5d3ca5040c35e
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 17:21:37 2023 +0200

    Fix SIG export function

commit 082798a80d8bb446500dcbadfa4912c510e4a458
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 17:01:42 2023 +0200

    Fix SAT export functions

commit 2f035afaa3d3c74ca811c96c66f7bf9726b31a78
Merge: 87555f20 d6139439
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 16:52:43 2023 +0200

    Merge remote-tracking branch 'upstream/dev' into removeRedundantDxccNames

commit 87555f201817fb963be117ab193d42bc03889972
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 23:54:14 2023 +0200

    Use DXCC entity name from dxcc_entities in ADIF export

commit e2fd1c5eb9b7e3257ed016814719bc7f9b913587
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 23:36:16 2023 +0200

    Make logbooks use DXCC name from entities table

commit 463057523dacbc34a545f0d9f720f2c29c9883a7
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 23:01:58 2023 +0200

    Use DXCC name from separate table in QSO view

commit 62b8f7aed8c1dca426b055eb7af6360106fc022b
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 18:21:57 2023 +0200

    Add table join to station profile lookup

commit 0afe155f46f1fcd227446166b215a98729494dc8
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 18:13:35 2023 +0200

    Remove country name from edit functions

commit ecb3689a0a73f0cc9c5ca7eba5dec7df5f9fbcd1
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 18:07:58 2023 +0200

    Remove station_country parameter

commit 22c350a585a3ff95d1d0b1f49dbe8ca310bdaf85
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 17:59:24 2023 +0200

    Use DXCC name from dxcc_entitites table
2023-04-25 00:13:49 +02:00
phl0
7205a82d61
Add function to delete public slugs 2022-10-15 20:50:20 +02:00
Peter Goodhall
eecd2bf71d [welcome] SQL statements being totally wrong 2022-10-11 17:10:44 +01:00
Peter Goodhall
c08257beaa [Welcome] Might fix bug 2022-10-11 16:54:32 +01:00
Peter Goodhall
b4f1f63098 [Welcome] Hide Creating Logbooks or claiming locations
Hide Creating Logbooks or claiming locations if they are already in the database
2022-10-09 16:46:37 +01:00
Andreas
a28eb44ac4 Fix for Logbook Model - now loads without a logbook defined. Fixed #1481 2022-07-02 23:40:04 +02:00
Peter Goodhall
f257ec1843
Merge pull request #1488 from phl0/logbookNames
Add logbook and station profile name to Logbook page
2022-06-15 14:48:28 +01:00
Thomas Werzmirzowsky
b2e32080c2 added possibility to sort locations by id
server side sort is obsolete because of client side sort
2022-05-04 23:42:05 +02:00
phl0
798d6315fd
Add logbook and station profile name to Logbook page 2022-05-02 12:38:55 +02:00
Peter Goodhall
f7427f59de [Visitor] Allows setting a public URL for viewing a basic dashboard 2022-03-24 14:26:03 +00:00
Peter Goodhall
56007fcfe4 [Station Logbooks] Code added for saving public slugs
Needs more validation added but its a start!
2022-02-09 22:51:46 +00:00
Peter Goodhall
4f2980a2a7 [Logbooks] Added system to check if a public slug is available 2022-02-09 22:29:29 +00:00
Thomas Werzmirzowsky
278cf3b016 set logbook active on creation of first logbook
set station profile active on creation of first station profile
disabled deletion of active logbook
disabled deletion of active station profile
2021-12-04 17:14:57 +01:00
Thomas Werzmirzowsky
0ff857357c added user checks to previous contacts and qsl management 2021-11-14 17:50:11 +01:00
Andreas
1b2a88b355 Removed all constructors in models, since this doesn't work in never CodeIgniter 2021-11-06 20:24:28 +01:00
Thomas Werzmirzowsky
61b41df1d9 created helper methods to check access 2021-10-31 10:17:14 +01:00
Thomas Werzmirzowsky
9ed56e7211 improvements to multi user support of stations/logbooks
- Set active logbooks checks if logbook belongs to user
- Link station to logbook checks that station and logbook belong to user
- Unlink station from logbook checks that station and logbook belong to user
- Edit of logbook only shows stations of user
- Set active station checks if station belongs to user
- find_active and find_gridsquare of Stations model now check user
2021-10-31 09:56:45 +01:00
Thomas Werzmirzowsky
5f39e99d47 sort logbook and station list by name 2021-10-20 21:26:35 +02:00
Peter Goodhall
87d5c8e1b0 [Station Logbook] Improved edit interface 2021-10-12 15:19:39 +01:00
Peter Goodhall
ce1d7a5351 Code added to have an active logbook and code to set it all up 2021-09-07 18:07:48 +01:00
Peter Goodhall
56e7827fe7 Adds code to create relationship between logbook and location 2021-09-07 17:42:35 +01:00
Peter Goodhall
79d9167e8b [Station Logbooks] Added functions to handle editing 2021-08-12 21:10:43 +01:00
Peter Goodhall
ee0a93b48a [Station Logbooks] Added code to create and delete station logbooks 2021-08-12 20:36:01 +01:00
Peter Goodhall
ef65494eb6 [Station Logbooks] Added the basics for the index page 2021-08-12 20:17:18 +01:00