Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-10-01 13:00:52 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-10-01 13:00:52 +0300
commit75111473589791e1d11dc9225798a19d248a6cbe (patch)
tree4564187489c4c261236bebc852a552f2142ec445 /app.go
parentb37ed1c0ff9880fb73ed2ed771c100333d79f3c5 (diff)
Remove references to `Project`
Always uses `LookupPath`. The `project` is local to `source/disk`.
Diffstat (limited to 'app.go')
-rw-r--r--app.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app.go b/app.go
index 67b94f2a..82cc2680 100644
--- a/app.go
+++ b/app.go
@@ -101,7 +101,7 @@ func (a *theApp) domain(host string) *domain.Domain {
}
func (a *theApp) checkAuthenticationIfNotExists(domain *domain.Domain, w http.ResponseWriter, r *http.Request) bool {
- if domain == nil || !domain.HasProject(r) {
+ if domain == nil || !domain.HasLookupPath(r) {
// Only if auth is supported
if a.Auth.IsAuthSupported() {
@@ -231,7 +231,7 @@ func (a *theApp) accessControlMiddleware(handler http.Handler) http.Handler {
// Only for projects that have access control enabled
if domain.IsAccessControlEnabled(r) {
// accessControlMiddleware
- if a.Auth.CheckAuthentication(w, r, domain.GetID(r)) {
+ if a.Auth.CheckAuthentication(w, r, domain.GetProjectID(r)) {
return
}
}