How to set data limits for users? Limit types of data?

I’m setting up a public gitea server for a specific projects, which has git lfs enabled (as the project does require large files).

I’m still a bit concerned that certain users could start to use this platform to simply save their (irrelevant) data

  • Is there a way to limit the amount of data stored per user, and if violated, send the administrators an email?
  • How can I filter by the type of data?

There are prereceive hooks: https://stackoverflow.com/questions/39576257/how-to-limit-file-size-on-commit

But it’s not clear (1) how this would apply to all users and all repos on the server and (2) this only uses file extensions

It looks like GitLab has server-side hooks which allows restrictions on commits

Does this exist for gitea?

Yes, Gitea admins can add git hooks to specific repos (or globally), however be aware if you want to give specific people access to editing githooks as it allows them to run code on the server (as that is what git hooks are). Look in the settings tab for repos for git hooks for a place to add the repo specific hooks.

Thanks @techknowlogick

How does one apply git hooks globally for all users? I’m not interested in repo-specific hooks