membership: list child and parent groups (#107)
* Group page shows child and parent groups
* moved recursion as a helper
* reworked several funcs to return directly Group type
* added TransitiveGroups on homepage
* added circular reference detection
* improved performance of transitive groups
* minor fix
* GetAllTransitiveGroupsForGroup parameter changed to string
* cover getting transitive groups with unit test
* recursion logic needs fix
* refactor: reuse code for processing user/group transitive groups
* recursion fix
---------
Co-authored-by: Giorgi Lekveishvili <lekva@gl-mbp-m1-max.local>
diff --git a/core/auth/memberships/index.html b/core/auth/memberships/index.html
index f78ae1d..03ee299 100644
--- a/core/auth/memberships/index.html
+++ b/core/auth/memberships/index.html
@@ -41,5 +41,18 @@
</tr>
{{- end -}}
</table>
+ <h4>Transitive Groups</h4>
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ </tr>
+ {{- range .TransitiveGroups -}}
+ <tr>
+ <td><a href="/group/{{ .Name }}">{{ .Name }}</a></td>
+ <td>{{ .Description }}</td>
+ </tr>
+ {{- end -}}
+ </table>
</body>
</html>