diff --git a/handlers/role.go b/handlers/role.go index ab5c4776..9686d894 100644 --- a/handlers/role.go +++ b/handlers/role.go @@ -26,7 +26,8 @@ var ( }, "participant": map[string][]int{ - "Response": []int{PermissionUpdate}, + "Participant": []int{PermissionRead}, + "Response": []int{PermissionUpdate}, }, "subscriber": map[string][]int{ diff --git a/templates/participants_show.html.tpl b/templates/participants_show.html.tpl index a27bea7e..1a8f6aa5 100644 --- a/templates/participants_show.html.tpl +++ b/templates/participants_show.html.tpl @@ -1,20 +1,23 @@ {{ define "content" }} -{{$isAdmin := .Claims|isAdmin}} +{{$isAdmin := .Claims|isAdmin}} {{$isSchool := .Claims|isSchool}} +{{$isParticipant := .Claims|isParticipant}}
+ {{if not $isParticipant}} {{template "breadcrumb" toSlice "Partecipanti" (all "Participant") (.Data|string) "current"}} {{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Participant") "deletePath" (.Data.ID|delete "Participant")}} - + {{end}} +

Informazioni generali

Username
-
{{.Data.User.Username}}
+
{{.Data.User.Username}}
Password
-
{{.Data.User.Password}}
+
{{.Data.User.Password}}
Categoria
{{.Data.Category}}
@@ -35,6 +38,7 @@
+ {{if or $isAdmin $isSchool}}
@@ -49,7 +53,8 @@
- + {{end}} + {{if $isAdmin}}
@@ -80,7 +85,9 @@
- + {{end}} + + {{if or $isAdmin $isParticipant}}
@@ -95,7 +102,6 @@
- {{end}}