View Issue Details

IDProjectCategoryView StatusLast Update
0000458librarianEnhancementpublic2024-09-17 11:33
Reportermikee Assigned Tomikee  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
PlatformPCOSLinuxOS VersionOS
Summary0000458: Needs to be multi user,
Description

Since a Linux system is multi user and share recources easily this need to work for non-admin users.

TagsNo tags attached.
Attach Tags
Git commit
GitLab/Hub Issue

Relationships

related to 0000434 feedbackmikee Owner not being set. 

Activities

mikee

2024-09-15 15:41

administrator   ~0001730

In a mutli user system/DB each owner needs contact information greater that just a name.
Housholds, partners etc. should be able to use the same DB/library to track their books stored on common shelves.
The owner name -> ID mapping can be done on forst ron when the .librarian.conf file is created.
Either a UUID can be used or a serial number from the DB.
Although I think a UUID would be better.

Well this led me down a rabbit hole.

The DB part needs to work for new users and existing users.
So if a UUID exists it should be used else inserted as a new user.
The UUID is generated in the config file when librarian is first run
but the DB access parts are not.
There needs to be a master config owned by the librrian admin from where
the DB access stuff is abtained AND a user config for each user.
OR access is granted by the users table in the DB by the UUID.

And what about inter-user book loans?

mikee

2024-09-15 15:57

administrator   ~0001731

Last edited: 2024-09-15 15:58

Since we need to read mutiple config files, we acon do this
import configparser
config = configparser.ConfigParser()
all_config_files = ['/etc/librarian/librarian.conf', '$HOME$.librarian.conf']
config.read(all_config_files)
Where values later in the list overwrite earlier ones.

git

2024-09-15 17:46

updater   ~0001732

Branch Bug-458 - commit 4fe2da1c1a410fbbadbdbd8b7664085ab3632c53
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sun Sep 15 17:11:48 2024 +0100

Mostly works.

Users should never need to know the DB creds.
Move master config to /etc/librarian/librarian.conf
Create a user ~/.config.librarian.conf just containing a UUID
User data stored in DB table users.
Load both configs on startup.

Admins will have to move the old .librarian.cfg to the new location
and create their own local config, then add the new UUID manually to
books.users.

For systems with a single existing user, the config will however
still attempt to read from the old location for backward compatibility.

README.adoc
src/db_queries.py
src/load_config.py
src/member_dialog.py

git

2024-09-15 17:46

updater   ~0001733

Branch Bug-458 - commit d2036e2ac8559ce2e798d193e0dfab5efeb2c414
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sun Sep 15 17:45:31 2024 +0100

Need a way to call the member_dialog.
modified:   src/load_config.py
modified:   src/member_dialog.py

src/load_config.py
src/member_dialog.py

git

2024-09-16 14:01

updater   ~0001734

Branch Bug-458 - commit f5b80ddb94d858d875073be26bb96cf895e5ce86
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Sep 16 10:19:15 2024 +0100

Update for storing user information.

books_schema.sql

git

2024-09-16 14:01

updater   ~0001735

Branch Bug-458 - commit ad36006bb0190fdabac1c654ab4dec525cede132
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Sep 16 12:19:11 2024 +0100

Entry box movement.

src/member_dialog.py

git

2024-09-16 14:01

updater   ~0001736

Branch Bug-458 - commit d30215c49c79032203009f1476a0ef74a208347b
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Sep 16 12:19:34 2024 +0100

modified:   src/db_queries.py
modified:   src/ui/config_edit.glade

src/db_queries.py
src/ui/config_edit.glade

git

2024-09-16 14:01

updater   ~0001737

Branch Bug-458 - commit fbf6bc61f8ff111e9d26285947afdab619db2661
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Sep 16 12:30:39 2024 +0100

More uuid malarky.

books_schema.sql

git

2024-09-16 14:01

updater   ~0001738

Branch Bug-458 - commit 4c081155cb1841a627692d232cd80a9bbd730657
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Sep 16 12:39:31 2024 +0100

Remove the sqlite stuff.

Multi-user will not work with this.

src/db_queries.py

git

2024-09-16 14:01

updater   ~0001739

Branch Bug-458 - commit 8978821ee682aab3c6f126da0291d9da8e5842c4
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Sep 16 12:51:01 2024 +0100

Get all books but just for the logged in user.

Uses their uuid.

src/add_edit.py
src/book.py
src/db_queries.py
src/librarian.py
src/member_dialog.py

git

2024-09-16 14:01

updater   ~0001740

Branch Bug-458 - commit b3c6099bb77e75fab33f4d527599d4faa730d4d2
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Sep 16 13:23:45 2024 +0100

Fix name edit bug.

src/add_edit.py
src/db_queries.py
src/member_dialog.py

git

2024-09-17 11:33

updater   ~0001741

Branch Bug-458 - commit 41e782fae37ca87e0e6f2b3665af13521c08505d
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Sep 17 11:28:55 2024 +0100

Bug fix.

Where no location is present.

src/bookmark.py

git

2024-09-17 11:33

updater   ~0001742

Branch Bug-458 - commit db4481feef8a83d9d2b3b065caefe0bf3077e424
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Sep 17 11:29:26 2024 +0100

modified:   src/add_edit.py

src/add_edit.py

Add Note

View Status
Note
Upload Files
Maximum size: 2,048 KiB

Attach files by dragging & dropping, selecting or pasting them.

Issue History

Date Modified Username Field Change
2024-09-15 15:39 mikee New Issue
2024-09-15 15:39 mikee Status new => assigned
2024-09-15 15:39 mikee Assigned To => mikee
2024-09-15 15:39 mikee Relationship added related to 0000434
2024-09-15 15:41 mikee Note Added: 0001730
2024-09-15 15:42 mikee Relationship replaced child of 0000434
2024-09-15 15:42 mikee Relationship replaced related to 0000434
2024-09-15 15:43 mikee Description Updated
2024-09-15 15:57 mikee Note Added: 0001731
2024-09-15 15:58 mikee Note Edited: 0001731
2024-09-15 17:46 git Note Added: 0001732
2024-09-15 17:46 git Note Added: 0001733
2024-09-16 14:01 git Note Added: 0001734
2024-09-16 14:01 git Note Added: 0001735
2024-09-16 14:01 git Note Added: 0001736
2024-09-16 14:01 git Note Added: 0001737
2024-09-16 14:01 git Note Added: 0001738
2024-09-16 14:01 git Note Added: 0001739
2024-09-16 14:01 git Note Added: 0001740
2024-09-17 11:33 git Note Added: 0001741
2024-09-17 11:33 git Note Added: 0001742