-
Notifications
You must be signed in to change notification settings - Fork 293
[WIP] User Accounts #623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[WIP] User Accounts #623
Conversation
|
what has to be considered as well are user related settings that are currently in the server config |
I'd say everything should be per user. that should also include downloads. I guess this would still be a problem even with separated downloads, unless every user uses their own source instance. everything that is currently stored on the file system would also have to be per user right? e.g. downloads and thumbnails |
|
Library update could be per user, for this I think we would need a task that runs every 6 hours, grabs manga from users who's interval has passed(could be days for some users, 6 at the minimum), and then update them. Downloader is more special, right now my idea is allow anyone to download, and the download queue will grab the user data based on the subscriber, this would allow unique user data to go to each user. This only works on gql, so the old websocket url won't have user data. Only admins would be able to delete files. Or we could make a userDeleted field in the chapter user data, and if all users who have that manga favorited have the userDeleted field true, then actually delete the file. I think normal vs cbz downloads would be configured by the system administrator, not per user. Everything on the filesystem doesn't need to be per user, since manga and chapter ids won't change between users, we dont need to separate anything. Thats right, if we separate sources per user, rate-limits won't properly apply between http clients. We may have to make source settings global that only the admin can change hmm. |
I guess you would have to decrease the task to 1h since in case someone has it to update between every e.g. 6h and 12h then it would only get triggered every 12h would this be one global updater or one per user? same for the downloader I guess?
I think that would be a better experience, since you don't have to manually clean up things that aren't needed anymore
that are the preferences right? I think doing it like that would be the easiest way, but I guess there are also settings which would make sense to be per user instead of global
|
|
There are technical limitations to source settings, since we need to have 1 source instance to preserve the rate-limit, we can't separate the sources per user, and since sources expect their settings to be in the source, we have to limit them to either be editable by everyone or admin only. There are drawbacks to library update and downloader sharing, but its the best option we have. We could always sort manga update order according to the the ones that are used the most or updating the smaller libraries first. I think 6 hours is a fine interval, since we can always just bump the user to the next interval. If a user sets 24 hours, they will always get the update at the same time, or if a user selects 6 hours, they will always get updates. |
|
I think the limitations should be made quite clear in the documentation once that is in to prevent any wrong expectations If the "global" update task runs every 6h then I think the possible update interval has to be changed to be only multiples of 6, since everything between them will be bumped to the next higher multiple |
|
Hmm, right I was thinking in Tachiyomi library update terms, I forgot that users can set weird update times like every 7 hours. I think every hour would be fine then |
# Conflicts: # server/build.gradle.kts # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MangaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/subscriptions/ApolloSubscriptionProtocolHandler.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/subscriptions/ApolloSubscriptionSessionState.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Library.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt
# Conflicts: # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ExtensionMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/CategoryQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ChapterQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ExtensionQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MangaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MetaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/SourceQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/MangaController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/chapter/ChapterForDownload.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/Downloader.kt
# Conflicts: # server/src/main/kotlin/suwayomi/tachidesk/global/controller/GlobalMetaController.kt # server/src/main/kotlin/suwayomi/tachidesk/global/controller/SettingsController.kt # server/src/main/kotlin/suwayomi/tachidesk/global/impl/GlobalMeta.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/CategoryDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/ChapterDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/MangaDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/MetaDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/BackupMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/CategoryMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/DownloadMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ExtensionMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MangaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MetaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SettingsMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SourceMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/UpdateMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/BackupQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/CategoryQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ChapterQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ExtensionQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/InfoQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MangaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MetaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/SourceQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLContextFactory.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLSchema.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/types/SettingsType.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/BackupController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/CategoryController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/DownloadController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/ExtensionController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/MangaController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/SourceController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Category.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Library.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Manga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/MangaList.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Search.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupExport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupImport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/chapter/ChapterForDownload.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryTable.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterTable.kt # server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt # server/src/test/kotlin/suwayomi/tachidesk/manga/impl/CategoryMangaTest.kt # server/src/test/kotlin/suwayomi/tachidesk/manga/impl/MangaTest.kt # server/src/test/kotlin/suwayomi/tachidesk/manga/impl/SearchTest.kt
|
Its a very low priority feature since none of the devs need it. If I have time I may continue working on it, I am also open to others contributing and completing any of the TODOs. |
|
Took a look at the source, Kotolin is not something I can help with unfortunately :/ |
# Conflicts: # .github/workflows/build_pull_request.yml # .github/workflows/build_push.yml # .github/workflows/publish.yml # gradle/libs.versions.toml # server/src/main/kotlin/suwayomi/tachidesk/global/controller/SettingsController.kt # server/src/main/kotlin/suwayomi/tachidesk/global/impl/GlobalMeta.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/CategoryDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/ChapterDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/MangaDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/MetaDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/BackupMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/CategoryMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/DownloadMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ExtensionMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/InfoMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MangaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MetaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SettingsMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SourceMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/UpdateMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/BackupQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/CategoryQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ChapterQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ExtensionQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/InfoQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MangaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MetaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/SettingsQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/SourceQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/UpdateQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLContextFactory.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/types/MangaType.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/types/SettingsType.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/BackupController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/CategoryController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/DownloadController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/ExtensionController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/MangaController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/SourceController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Category.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Library.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Manga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/MangaList.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/models/ChapterImpl.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupExport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupImport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/chapter/ChapterForDownload.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/Downloader.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryTable.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterTable.kt # server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt # server/src/test/kotlin/suwayomi/tachidesk/manga/controller/UpdateControllerTest.kt # server/src/test/kotlin/suwayomi/tachidesk/test/TestUtils.kt
|
Hi @Syer10, I came across your work on the User Accounts feature branch and noticed it's marked as WIP. Since some time has passed, I wanted to ask:
I'm particularly interested in helping bring this feature to completion and would appreciate any guidance on:
Thanks for your work on this. |
|
@ov3rsp1der I would love some contributions on this! To answer your questions:
For Archeticual decisions, it should hopefully be pretty recognizable in the code. There will only be GQL endpoints for user handling(as the REST API is deprecated). We use the |
# Conflicts: # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/CategoryMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/UpdateMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/InfoQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/UpdateQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/MangaController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Category.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupImport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/chapter/ChapterForDownload.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/Downloader.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/Track.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterTable.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/MangaTable.kt # server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt
|
Thank you! let's see what I can do |
|
With the recent merge of the basic JWT login, I've gotten interested in helping out with multi-user support. Before diving in, I'd like to discuss how this would interact with the existing authentication modes. For example, once an instance has multiple users, how would one revert back to a 'no-auth' mode, or switch to a single-user basic auth mode? I'm guessing the idea might be that each user gets their own /library and the decision to protect it is handled on a per-user basis? Or maybe the server would be toggled between a single-user and multi-user mode entirely? |
|
Each user does get thier own library, the default user(user id 1) is the only user by default and is what will be used when multiuser is disabled. Enabling multiuser would allow access to the server by other users. All data will be stored in the same way regardless. If multiuser is disabled, all data will be kept but only the default user will be accessible |
# Conflicts: # gradle/libs.versions.toml # server/build.gradle.kts # server/src/main/kotlin/suwayomi/tachidesk/global/controller/GlobalMetaController.kt # server/src/main/kotlin/suwayomi/tachidesk/global/impl/GlobalMeta.kt # server/src/main/kotlin/suwayomi/tachidesk/global/impl/util/Jwt.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/TrackDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/BackupMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/CategoryMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/DownloadMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ExtensionMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/InfoMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MangaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MetaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SettingsMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SourceMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/TrackMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/UpdateMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/UserMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/BackupQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/CategoryQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ChapterQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ExtensionQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/InfoQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MangaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MetaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/SettingsQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/TrackQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/UpdateQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLContextFactory.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/subscriptions/DownloadSubscription.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/subscriptions/InfoSubscription.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/subscriptions/UpdateSubscription.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/BackupController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/CategoryController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/MangaController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/SourceController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/TrackController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Category.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/ChapterDownloadHelper.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Manga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Source.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupExport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupImport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/chapter/ChapterForDownload.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/Track.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/DeletableTracker.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/Tracker.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/anilist/Anilist.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/anilist/AnilistInterceptor.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/bangumi/Bangumi.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/kitsu/Kitsu.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/kitsu/KitsuInterceptor.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/mangaupdates/MangaUpdates.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/myanimelist/MyAnimeList.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/track/tracker/myanimelist/MyAnimeListInterceptor.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/TrackRecordTable.kt # server/src/main/kotlin/suwayomi/tachidesk/opds/controller/OpdsV1Controller.kt # server/src/main/kotlin/suwayomi/tachidesk/opds/impl/Opds.kt # server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt # server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt # server/src/main/kotlin/suwayomi/tachidesk/server/user/UserType.kt # server/src/main/resources/server-reference.conf
d16306b to
63837b2
Compare
345dea1 to
d8f58f4
Compare
|
I have merged the branch with the latest server. |
I understand the point about starting with or reverting to the traditional single-user mode. However, it presents a challenge when you consider that users can be deleted and that at least one administrator role must exist. This leads to scenarios where, for instance, in a two-user setup where both are admins (e.g., ID 1 and ID 2), the second admin could revoke the admin role from the default user (ID 1). In that case, how would the system revert to single-user mode? I suppose the best approach would be one of two options: either the administrator who makes the change to single-user mode becomes the sole active account, or the administrator can select which account will become the active one in single-user mode. |
|
The way I am thinking of is that there is the admin(id 1), and they can manage permissions for all other users. Manage permissions could also be a permission, but no permissions are can actually be taken away by user 1, since they have all of them. |
|
I'm concerned that tying a permanent, irrevocable admin role to user ID 1 isn't a secure strategy due to potential security risks. While I know Suwayomi is self-hosted and mostly used on LANs, there's always a chance an instance could be exposed online. If the credentials for user ID 1 were compromised, there would be no way for a second administrator to revoke their permissions. It's a basic and common practice in any multi-user system for administrators to be able to manage each other's permissions to handle such security threats. I can't think of any examples of systems that use the model you're proposing. |
|
The closest application that sorta models the way I am thinking of taking Suwayomi is Plex. There is 1 central user that manages the app, and everyone else is given access and is secondary. |
|
Hmm, I'm not very familiar with Plex. I tried it briefly but switched to Jellyfin precisely because it wasn't possible for two users to administer the same server. That said, one concern I have is how OIDC support would be added later under this strategy. I suppose it could be handled like Kavita does, where OIDC accounts are not the same as the accounts generated from within Suwayomi itself. Perhaps it would be a good idea to do some kind of poll to see how the community would prefer to handle multiple users? I might not be the only one who is not entirely comfortable with the vision of making it similar to Plex's single-admin management. |
I agree with @Syer10 I think if you expose root admin credentials it's on you really |
# Conflicts: # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SettingsMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/types/SettingsType.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupExport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/models/BackupServerSettings.kt # server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt # server/src/main/resources/server-reference.conf
Maybe I'm not seeing it, but why not just change the password? As long as an admin can reset or set the password, that's effectively as good as disabling the account and creating a new one. If we allow changing user names additionally (since everything is tied to IDs anyways), there's no functional difference at all. |
|
Regarding dhvcc's point about the AWS root account model, I agree that's a good example. My main concern was a Plex-like, single-admin strategy, which I personally find too restrictive as it prevents delegating full administrative permissions. The AWS approach addresses my primary worry, as it fits Suwayomi's current structure well and would avoid significant refactoring. However, my question is how OIDC integration would work. We would need to consider whether to link external accounts to standard users—who could then be promoted in their role—while keeping the root user separate, or to simply ignore role customizations for any OIDC account that matches the root user. |
|
I do not have any actual expierence with OIDC, but my vision would be that admin roles would be copied over to Suwayomi where possible, but the root user would never be able to have thier roles or permissions changed. I think if they want thier accounts to be controlled by OIDC, that they should leave the root user unattached to an OIDC account. OIDC users would be a regular user, maybe with a OIDC table row that references the specific user its attached to, or just a column on the user table. Depending on which is easiest and makes the most sense to implement. |
Closes #298
Todo: