Allow changing registration button link #8286

Open
opened 2025-11-02 08:01:03 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @SamWhited on GitHub (Dec 25, 2021).

Feature Description

It would be nice if there was a way to add the registration button back to the header and change the link without enabling registration. My use case is a service where registration is not enabled but self-provisioning through a third party application is possible. For example, when a user donates to the project on Open Collective a webhook is fired that triggers an application that provisions an account for the user. The registration link therefore would just be a link to the Open Collective profile for the project. Other similar self-provisioning scenarios could also be accomplished with a simple link.

Screenshots

No response

Originally created by @SamWhited on GitHub (Dec 25, 2021). ### Feature Description It would be nice if there was a way to add the registration button back to the header and change the link without enabling registration. My use case is a service where registration is not enabled but self-provisioning through a third party application is possible. For example, when a user donates to the project on Open Collective a webhook is fired that triggers an application that provisions an account for the user. The registration link therefore would just be a link to the Open Collective profile for the project. Other similar self-provisioning scenarios could also be accomplished with a simple link. ### Screenshots _No response_
Author
Owner

@wxiaoguang commented on GitHub (Dec 25, 2021):

You could customize the Register page, and write something like window.location.href=YOUR_URL;

@wxiaoguang commented on GitHub (Dec 25, 2021): You could customize the Register page, and write something like `window.location.href=YOUR_URL`;
Author
Owner

@SamWhited commented on GitHub (Dec 25, 2021):

I think that would still require enabling registration though for that page to be available, so it feels like a bit of a dangerous hack.

@SamWhited commented on GitHub (Dec 25, 2021): I think that would still require enabling registration though for that page to be available, so it feels like a bit of a dangerous hack.
Author
Owner

@a1012112796 commented on GitHub (Jan 1, 2022):

maybe use oauth2 is good choice for you.

@a1012112796 commented on GitHub (Jan 1, 2022): maybe use oauth2 is good choice for you.
Author
Owner

@SamWhited commented on GitHub (Jan 2, 2022):

We already have self-provisioning, but it doesn't use OAuth2 deliberately (the service we're provisioning against doesn't support oauth). What we really want is just a way to have the register button exist. Right now we're adding it to the home page template, but overriding the header bar template would be a lot harder to maintain on each update of Gitea, so having a way to just say "the register link points somewhere else" would be a lot nicer.

@SamWhited commented on GitHub (Jan 2, 2022): We already have self-provisioning, but it doesn't use OAuth2 deliberately (the service we're provisioning against doesn't support oauth). What we really want is just a way to have the register button exist. Right now we're adding it to the home page template, but overriding the header bar template would be a lot harder to maintain on each update of Gitea, so having a way to just say "the register link points somewhere else" would be a lot nicer.
Author
Owner

@a1012112796 commented on GitHub (Jan 3, 2022):

maybe /custom/extra_links.tmpl is usefull for you.

@a1012112796 commented on GitHub (Jan 3, 2022): maybe [/custom/extra_links.tmpl](https://docs.gitea.io/en-us/customizing-gitea/#adding-links-and-tabs) is usefull for you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8286