Bug fix in group profile template.

This commit is contained in:
Nick Gerakines 2020-04-06 16:25:29 -04:00
parent 965d9bc25f
commit ebc6ade7c2
No known key found for this signature in database
GPG Key ID: 33D43D854F96B2E4
2 changed files with 7 additions and 3 deletions

View File

@ -13,7 +13,7 @@
{{ end }}
</div>
</div>
{{ if and .authenticated (eq .group.OwnerID .user.ID )}}
{{ if .owner }}
{{ $user := .user }}
{{ $userActor := .user_actor }}
<div class="row pt-3 border-top">
@ -79,7 +79,8 @@
checked="checked"
{{ end }}
value="true">
<label class="form-check-label" for="updateGroupDirectoryOptIn">Display in the groups directory</label>
<label class="form-check-label" for="updateGroupDirectoryOptIn">Display in the groups
directory</label>
</div>
<input type="submit" class="btn btn-dark" name="submit" value="Update"/>
</form>

View File

@ -60,12 +60,15 @@ func (h handler) viewGroup(c *gin.Context) {
}
data["members_total"] = totalMembers
data["authenticated"] = authenticated
data["owner"] = false
if !authenticated {
return nil
}
data["authenticated"] = true
data["user"] = localUser
data["owner"] = group.OwnerID == localUser.ID
userActor, err := tx.GetActor(ctx, localUser.ActorID)
if err != nil {