File tree 3 files changed +14
-0
lines changed 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,8 @@ enterred_invalid_owner_name = Please ensure that the owner name you entered is c
259
259
enterred_invalid_password = Please ensure the that password you entered is correct.
260
260
user_not_exist = The user does not exist.
261
261
last_org_owner = Removing the last user from the owner team is not allowed because there must always be at least one owner in any given organization.
262
+ cannot_add_org_to_team = Organization cannot be added as a team member.
263
+ cannot_invite_org_to_org = Organization cannot be invited as an organization member.
262
264
263
265
invalid_ssh_key = Sorry, we were not able to verify your SSH key: %s
264
266
invalid_gpg_key = Sorry, we were not able to verify your GPG key: %s
Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ func Invitation(ctx *context.Context) {
114
114
return
115
115
}
116
116
117
+ if u .IsOrganization () {
118
+ ctx .Flash .Error (ctx .Tr ("form.cannot_invite_org_to_org" ))
119
+ ctx .Redirect (ctx .Org .OrgLink + "/invitations/new" )
120
+ return
121
+ }
122
+
117
123
if err = org .AddMember (u .ID ); err != nil {
118
124
ctx .Handle (500 , " AddMember" , err )
119
125
return
Original file line number Diff line number Diff line change @@ -88,6 +88,12 @@ func TeamsAction(ctx *context.Context) {
88
88
return
89
89
}
90
90
91
+ if u .IsOrganization () {
92
+ ctx .Flash .Error (ctx .Tr ("form.cannot_add_org_to_team" ))
93
+ ctx .Redirect (ctx .Org .OrgLink + "/teams/" + ctx .Org .Team .LowerName )
94
+ return
95
+ }
96
+
91
97
err = ctx .Org .Team .AddMember (u .ID )
92
98
page = "team"
93
99
}
You can’t perform that action at this time.
0 commit comments