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

Option to show login page instead of home page #9597

Closed
timonegk opened this issue Jan 3, 2020 · 3 comments · Fixed by #9622
Closed

Option to show login page instead of home page #9597

timonegk opened this issue Jan 3, 2020 · 3 comments · Fixed by #9622
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@timonegk
Copy link
Contributor

timonegk commented Jan 3, 2020

  • Gitea version (or commit ref): 1.10.1

Description

In my use case, the user must always be logged in to use my gitea instance, there are no public repositories. Therefore I would like to let the user always land on the login page when they are not logged in. When they are logged in, they should be redirected to their home page, as usual.
Currently, the closest I can get there is by setting LANDING_PAGE = explore – this redirects unauthenticated users to the login page, but authenticated users are of course redirected to the explore page. Setting LANDING_PAGE = home shows the Gitea start page instead of the login page to unauthenticated users.
Am I missing a setting or is it not implemented?

@bagasme
Copy link
Contributor

bagasme commented Jan 4, 2020

@timonegk what about LANDING_PAGE = user/login?

@timonegk
Copy link
Contributor Author

timonegk commented Jan 4, 2020

According to the documentation and the sample app.ini, the only possible values are home, explore and organizations. But maybe other values work nevertheless, I can try later.

@sapk
Copy link
Member

sapk commented Jan 6, 2020

Only the three in the docs are supported this would need a fix here :

switch sec.Key("LANDING_PAGE").MustString("home") {

By adding a new case.

@sapk sapk added type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jan 6, 2020
@sapk sapk closed this as completed in #9622 Jan 6, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants