1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| {% import ( "{{{ .Package }}}/app" "{{{ .Package }}}/app/lib/user" ) %}
{% func Permissions(perms user.Permissions, as *app.State) %} {%- if len(perms) > 0 -%} <div class="card"> <h3>Permissions</h3> <div class="overflow full-width"> <table> <thead> <tr> <th>Path</th> <th>Match</th> <th>Allow</th> </tr> </thead> <tbody> {%- for _, p := range perms -%} <tr> <td>{%s p.Path %}</td> <td>{%s p.Match %}</td> <td>{%v p.Allow %}</td> </tr> {%- endfor -%} </tbody> </table> </div> </div> {%- endif -%} {% endfunc %}
|