Skip to content
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

External user sync on demand #21672

Open
pboguslawski opened this issue Nov 3, 2022 · 3 comments
Open

External user sync on demand #21672

pboguslawski opened this issue Nov 3, 2022 · 3 comments
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@pboguslawski
Copy link
Contributor

Feature Description

Consider adding cli to allow admin to force user sync from all external sources (or optionally from specified source if not harder to implement) independent from cron task (should work when gitea web is running and also if not - similar to auth config setup).

Maybe something like gitea admin auth do-sync

Why:

  • will allow user list to be updated manually just after updating external user list, without restarting gitea nor waiting for cron task to sync,
  • will allow to adjust user config (i.e. disable sending notifications to admin using SQL query) in automatic initialization scenarios (i.e. in docker); now no user accounts are present after external sync is configured - must wait for gitea to be started if RUN_AT_START is used or wait for cron task if not).

Screenshots

No response

@pboguslawski pboguslawski added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Nov 3, 2022
@techknowlogick
Copy link
Member

Thanks for this proposal, I have been thinking about this recently too and an alternative I considered was to allow system cron to call internal cron. What about something like "gitea cron xyz" where xyz would be the specific task, and then the cron job would call the binary with the options needed?

@pboguslawski
Copy link
Contributor Author

If every gitea cron task may be executed without gitea web running, running gitea exec-task xyz may be good (and more general) alternative to running gitea admin auth do-sync. Important part is to allow operation in both offline (gitea web down) and online (gitea web up) modes.

@KN4CK3R
Copy link
Member

KN4CK3R commented Nov 3, 2022

Not exactly what you are asking for but you can trigger the job from the admin panel too:

grafik
or
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

3 participants