diff options
author | JakobDev <jakobdev@gmx.de> | 2023-07-25 10:26:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-25 08:26:27 +0000 |
commit | 6598d0291cf7dfeb00cb5e5d18faf2bf46fad596 (patch) | |
tree | 00fda6f81294ac7c203836581ca25b3a41df819d /services | |
parent | af1ffbcd63569df8646b20c524378f25710f129e (diff) | |
download | gitea-6598d0291cf7dfeb00cb5e5d18faf2bf46fad596.tar.gz gitea-6598d0291cf7dfeb00cb5e5d18faf2bf46fad596.zip |
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 <kontakt@denyskon.de>
Co-authored-by: Denys Konovalov <privat@denyskon.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'services')
-rw-r--r-- | services/convert/convert.go | 1 | ||||
-rw-r--r-- | services/forms/org.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/services/convert/convert.go b/services/convert/convert.go index cb246a8b4b..a7a777e8bd 100644 --- a/services/convert/convert.go +++ b/services/convert/convert.go @@ -289,6 +289,7 @@ func ToOrganization(ctx context.Context, org *organization.Organization) *api.Or Name: org.Name, UserName: org.Name, FullName: org.FullName, + Email: org.Email, Description: org.Description, Website: org.Website, Location: org.Location, diff --git a/services/forms/org.go b/services/forms/org.go index c333bead31..6e2d787516 100644 --- a/services/forms/org.go +++ b/services/forms/org.go @@ -38,6 +38,7 @@ func (f *CreateOrgForm) Validate(req *http.Request, errs binding.Errors) binding type UpdateOrgSettingForm struct { Name string `binding:"Required;Username;MaxSize(40)" locale:"org.org_name_holder"` FullName string `binding:"MaxSize(100)"` + Email string `binding:"MaxSize(255)"` Description string `binding:"MaxSize(255)"` Website string `binding:"ValidUrl;MaxSize(255)"` Location string `binding:"MaxSize(50)"` |