|
|
|
@ -103,6 +103,12 @@ func (s *server) communitiesHandler(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
|
|
func (s *server) userCommunitiesHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
response := s.newResponse("communities", w, r) |
|
|
|
|
if response.User == "" { |
|
|
|
|
log.Println("Attemp to list own community without being logged") |
|
|
|
|
s.forbiddenHandler(w, r) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
communities, err := s.ldap.UserGroups(response.User) |
|
|
|
|
if err != nil { |
|
|
|
|
log.Println("An error ocurred retrieving community list: ", err) |
|
|
|
|