-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Allow selecting an MC server to use for group sync options #2991
Conversation
@Aberdeener We will actually need primary check in ServerInfoEndpoint aswell? so other servers don't perform group syncs as they will return groups and may even different groups and if its empty it will remove all groups |
I’m not totally sure what you mean sorry, what needs to be changed in the
PR?
…On Sat, Aug 6, 2022 at 17:46 Partydragen ***@***.***> wrote:
@Aberdeener <https://github.com/Aberdeener> We will actually need this in
ServerInfoEndpoint aswell? so other servers don't perform group syncs as
they will return groups and may even different groups and if its empty it
will remove all groups
—
Reply to this email directly, view it on GitHub
<#2991 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGG43DF6TYXW4JIBNFBVIGDVX32PDANCNFSM55ZI2CQQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
So ServerInfoEndpoint will only run group sync if server id match primary server id |
Will change PR base branch later and merge then |
16f6d0c
to
c1e179c
Compare
16f6d0c
to
e3cb148
Compare
thank you stackoverflow for teaching me how to fix that mess |
custom/panel_templates/Default/integrations/minecraft/minecraft_servers.tpl
Show resolved
Hide resolved
@@ -252,7 +252,8 @@ | |||
"admin/group_sync": "Group Sync", | |||
"admin/group_sync_info": "You can configure the API to automatically update a user's website group when their integration group is changed. Simply enter the integration group name\/ID and the website group it will be synchronised with the below rules.", | |||
"admin/group_sync_logs": "Group Sync Changes", | |||
"admin/group_sync_plugin_not_set_up": "In-game plugin is not set up", | |||
"admin/group_sync_server": "Select a Minecraft server to get group sync groups from", | |||
"admin/group_sync_plugin_not_set_up": "In-game plugin is not set up or no group sync server has been selected", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this leaks onto a second line, better than being not fully specific imo.
@@ -26,14 +26,17 @@ public function getColumnType(): string { | |||
} | |||
|
|||
public function shouldEnable(): bool { | |||
return count($this->getSelectionOptions()) > 0; | |||
return Util::getSetting('group_sync_mc_server') != 0 && count($this->getSelectionOptions()) > 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldEnable
method is called during a group sync broadcast, meaning the Minecraft injector will be ignored fully if they have not select a server to get group sync groups from - I think this is the best way forward
Closes #2986
This solves the problem of users having multiple servers which are all sending group names to the website, so when they reload the group sync page sometimes the groups are gone or different.