Opened 18 years ago

Closed 16 years ago

#2532 closed task (wontfix)

multiuser : review + test/fix + merge

Reported by: danielk Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

This is a tracking ticket for getting the multiuser code up to snuff and merged.

Change History (17)

comment:1 Changed 18 years ago by danielk

Owner: changed from Isaac Richards to danielk
Version: 0.20head

comment:2 Changed 18 years ago by danielk

(In [11448]) Refs #2532. Merges just mythtv r11340:11430 in svn head to multiuser.

comment:3 Changed 18 years ago by danielk

(In [11449]) Refs #2532. Merges just mythtv r11430:11448 in svn head to multiuser.

comment:4 Changed 18 years ago by danielk

(In [11450]) Refs #2532. Fixes uncaught conflict in last merge (mythtv r11430:11448 from svn head to multiuser).

comment:5 Changed 18 years ago by danielk

(In [11451]) Refs #2532. Cleanup pass over account.{h,cpp}, and its reverb through other classes.

comment:6 Changed 18 years ago by danielk

(In [11452]) Refs #2532. Cleanup of accounts.{cpp,h}, and its reverb through other classes.

In its current state we reload the accounts from the DB everytime we use this class and we don't do anything to ensure consistency between different frontends (or even within a single frontend). This moves all the unsafe functions into accounts, but doesn't yet make them threadsafe, once it is threadasafe we can turn this into a singleton class which will make it easier to ensure DB consistency.

comment:7 Changed 18 years ago by danielk

(In [11459]) Refs #2532. Cleanup of mythdialogs.{cpp,h}, and its reverb through other classes.

comment:8 Changed 18 years ago by danielk

(In [11466]) Refs #2532. Cleanup of mythcontext.{cpp,h}, and its reverb through other classes.

It looks like the backend is only aware of the state of one frontend, so this will need to be fixed later. Also there seems to be no sanity check that a user being deleted is not logged in, and frontends appear not to be informed of changes to the current users profile.

comment:9 Changed 18 years ago by danielk

(In [11478]) Refs #2532. Cleanup of tv_play.{cpp,h}, and its reverb through other classes.

comment:10 Changed 18 years ago by danielk

(In [11483]) Refs #2532. Merges just mythtv r11448:11482 in svn head to multiuser.

comment:11 Changed 18 years ago by danielk

(In [11484]) Refs #2532. Cleanup of channelbase.cpp and channelutil.cpp.

channelutil.cpp really doesn't appear to need any changes wrt to svn head (so the changes have been reverted), while channelbase has a problematic set of changes.

The channelbase code assumes it knows who is logged into the single frontend and restricts the available channels respectively, but this prevents scheduled recordings for any other user, and also assumes that there is only ever one frontend. The channel restrictions have to be implemented on the frontend or be implemented some other way if implementing them on the frontend is not feasible.

This commit does not fix the channelbase problem, it just cleans up the code that is there.

comment:12 in reply to:  11 Changed 18 years ago by danielk

Replying to danielk:

(In [11484]) Refs #2532. Cleanup of channelbase.cpp and channelutil.cpp. The channelbase code assumes it knows who is logged into the single frontend and restricts the available channels respectively, but this prevents scheduled recordings for any other user, and also assumes that there is only ever one frontend. The channel restrictions have to be implemented on the frontend or be implemented some other way if implementing them on the frontend is not feasible.

Note: These files: cardutil.cpp, videosource.cpp, profilegroup.cpp, recordingprofile.cpp, scanwizardhelpers.cpp, channelbase.cpp, mythcontext.{cpp,h}, all assume that there is only ever one user logged in and that this user's available channels should restrict the channels and hardware that the backend has access too. The changes in all these files, except mythcontext.{cpp,h} can probably be safely reverted and replaced with a filtering mechanism in tv_play.cpp and the recording view screens.

comment:13 Changed 18 years ago by danielk

(In [11485]) Refs #2532. Cleanup of osdlistbtntype.cpp and dbcheck.cpp.

comment:14 Changed 18 years ago by danielk

(In [11486]) Refs #2532. Cleanup of mythmainwindow.cpp and myththemedmenu.cpp,

Two smallish problems noted:

1/ It is possible to remap the change login key without being logged in as root 2/ keybinding made as root are not available to all users

comment:15 Changed 18 years ago by danielk

(In [11487]) Refs #2532. First pass of cleanup of mythfrontend/main.cpp.

This is just a basic cleanup pass, there will be additional fixes.

The RemoveAccount?() function does not do all the sanity chect you need to do but some of this requires protocol changes. Also the "--login" param shouldn't be needed, instead we can just check if the root account password is blank..

comment:16 Changed 18 years ago by danielk

(In [11488]) Refs #2532. First pass of cleanup of mainserver.{cpp,h}

There are a few problems not addressed in this cleanup:
 * The add/del/change account requests should only be handled by the master backend.
 * The delete acccount request should verify that the user being deleted is not logged in.
 * The backend should track which frontends each account is logged into.
 * Account permission changes should be propagated to all the frontends.
 * Passwords should be hashed not plaintext in the DB and when getting passed around MythTV.
 * The SET_ACCOUNT command appears to be misnamed ("GET_ACCOUNT_INFO" maybe?)
 * GET_ACCOUNTSLIST should probably leave out the passwords in the list.

comment:17 Changed 16 years ago by danielk

Resolution: wontfix
Status: newclosed

Code has moved on too much since this was last worked on...

Note: See TracTickets for help on using tickets.