From 904e5781d8242639654036884f0f926ccfe17cbc Mon Sep 17 00:00:00 2001
From: Janne Koschinski <janne@kuschku.de>
Date: Sun, 18 Mar 2018 06:23:19 +0100
Subject: [PATCH] Fixed formatting

---
 templates/_navigation.html | 2 +-
 util.go                    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/_navigation.html b/templates/_navigation.html
index d5d31c9..67c5562 100644
--- a/templates/_navigation.html
+++ b/templates/_navigation.html
@@ -2,7 +2,7 @@
 <nav>
     <ul>
         <li class="title"><a href="/">i.k8r</a></li>
-    {{if .hasRole "imghost:user" }}
+    {{if .HasRole "imghost:user" }}
         <li><a href="/upload">Upload</a></li>
     {{end}}
         <li class="spacer"></li>
diff --git a/util.go b/util.go
index 2f40864..ee392ce 100644
--- a/util.go
+++ b/util.go
@@ -16,7 +16,7 @@ type UserInfo struct {
 	Roles []string
 }
 
-func (info *UserInfo) hasRole(role string) bool {
+func (info *UserInfo) HasRole(role string) bool {
 	for _, r := range info.Roles {
 		if r == role {
 			return true
-- 
GitLab