github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vauth/Permissions.html (about) 1 <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 2 {% import ( 3 "github.com/kyleu/dbaudit/app" 4 "github.com/kyleu/dbaudit/app/lib/user" 5 ) %} 6 7 {% func Permissions(perms user.Permissions, as *app.State) %} 8 {%- if len(perms) > 0 -%} 9 <div class="card"> 10 <h3>Permissions</h3> 11 <div class="overflow full-width"> 12 <table> 13 <thead> 14 <tr> 15 <th>Path</th> 16 <th>Match</th> 17 <th>Allow</th> 18 </tr> 19 </thead> 20 <tbody> 21 {%- for _, p := range perms -%} 22 <tr> 23 <td>{%s p.Path %}</td> 24 <td>{%s p.Match %}</td> 25 <td>{%v p.Allow %}</td> 26 </tr> 27 {%- endfor -%} 28 </tbody> 29 </table> 30 </div> 31 </div> 32 {%- endif -%} 33 {% endfunc %}