From 6598d0291cf7dfeb00cb5e5d18faf2bf46fad596 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Tue, 25 Jul 2023 10:26:27 +0200 Subject: Allow Organisations to have a E-Mail (#25082) Resolves #25057 This adds a E-Mail field to Organisations. The E-Mail is just shown on the Profile when it is visited by a logged in User. The E-mail is not used for something else. **Screenshots:** ![grafik](https://github.com/go-gitea/gitea/assets/15185051/a8d622b3-7278-4c08-984b-9c5ebfdb5471) ![grafik](https://github.com/go-gitea/gitea/assets/15185051/6dcb1dd7-d04b-49eb-bc96-6582cfe9757b) --------- Co-authored-by: Denys Konovalov Co-authored-by: Denys Konovalov Co-authored-by: wxiaoguang Co-authored-by: Giteabot --- modules/structs/org.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') diff --git a/modules/structs/org.go b/modules/structs/org.go index 7c83dcdee7..c0a545ac1c 100644 --- a/modules/structs/org.go +++ b/modules/structs/org.go @@ -8,6 +8,7 @@ type Organization struct { ID int64 `json:"id"` Name string `json:"name"` FullName string `json:"full_name"` + Email string `json:"email"` AvatarURL string `json:"avatar_url"` Description string `json:"description"` Website string `json:"website"` @@ -32,6 +33,7 @@ type CreateOrgOption struct { // required: true UserName string `json:"username" binding:"Required;Username;MaxSize(40)"` FullName string `json:"full_name" binding:"MaxSize(100)"` + Email string `json:"email" binding:"MaxSize(255)"` Description string `json:"description" binding:"MaxSize(255)"` Website string `json:"website" binding:"ValidUrl;MaxSize(255)"` Location string `json:"location" binding:"MaxSize(50)"` @@ -46,6 +48,7 @@ type CreateOrgOption struct { // EditOrgOption options for editing an organization type EditOrgOption struct { FullName string `json:"full_name" binding:"MaxSize(100)"` + Email string `json:"email" binding:"MaxSize(255)"` Description string `json:"description" binding:"MaxSize(255)"` Website string `json:"website" binding:"ValidUrl;MaxSize(255)"` Location string `json:"location" binding:"MaxSize(50)"` -- cgit v1.2.3