diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 9b5bd6dc5..dd9d05c1a 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -274,7 +274,6 @@ enterred_invalid_password = Please ensure the that password you entered is corre user_not_exist = The user does not exist. 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. cannot_add_org_to_team = Organization cannot be added as a team member. -cannot_invite_org_to_org = Organization cannot be invited as an organization member. invalid_ssh_key = Sorry, we were not able to verify your SSH key: %s invalid_gpg_key = Sorry, we were not able to verify your GPG key: %s @@ -1070,7 +1069,6 @@ org_name_helper = Great organization names are short and memorable. create_org = Create Organization repo_updated = Updated people = People -invite_someone = Invite Someone teams = Teams lower_members = members lower_repositories = repositories diff --git a/routers/org/members.go b/routers/org/members.go index 1b74b5f74..aa3646d1e 100644 --- a/routers/org/members.go +++ b/routers/org/members.go @@ -17,8 +17,6 @@ import ( const ( // tplMembers template for organization members page tplMembers base.TplName = "org/member/members" - // tplMemberInvite template for orgnization invite page - tplMemberInvite base.TplName = "org/member/invite" ) // Members render orgnization users page @@ -94,41 +92,3 @@ func MembersAction(ctx *context.Context) { ctx.Redirect(setting.AppSubURL + "/") } } - -// Invitation render organization invitation page -func Invitation(ctx *context.Context) { - org := ctx.Org.Organization - ctx.Data["Title"] = org.FullName - ctx.Data["PageIsOrgMembers"] = true - - if ctx.Req.Method == "POST" { - uname := ctx.Query("uname") - u, err := models.GetUserByName(uname) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.Flash.Error(ctx.Tr("form.user_not_exist")) - ctx.Redirect(ctx.Org.OrgLink + "/invitations/new") - } else { - ctx.Handle(500, " GetUserByName", err) - } - return - } - - if u.IsOrganization() { - ctx.Flash.Error(ctx.Tr("form.cannot_invite_org_to_org")) - ctx.Redirect(ctx.Org.OrgLink + "/invitations/new") - return - } - - if err = org.AddMember(u.ID); err != nil { - ctx.Handle(500, " AddMember", err) - return - } - - log.Trace("New member added(%s): %s", org.Name, u.Name) - ctx.Redirect(ctx.Org.OrgLink + "/members") - return - } - - ctx.HTML(200, tplMemberInvite) -} diff --git a/routers/routes/routes.go b/routers/routes/routes.go index e6079445b..ac71b5eba 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -407,8 +407,6 @@ func RegisterRoutes(m *macaron.Macaron) { m.Route("/delete", "GET,POST", org.SettingsDelete) }) - - m.Route("/invitations/new", "GET,POST", org.Invitation) }, context.OrgAssignment(true, true)) }, reqSignIn) // ***** END: Organization ***** diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 9b8b31166..18782e398 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -52,11 +52,6 @@ {{end}} {{end}} - {{if .IsOrganizationOwner}} -
- {{.i18n.Tr "org.invite_someone"}} -
- {{end}} {{if .IsOrganizationMember}}
diff --git a/templates/org/member/invite.tmpl b/templates/org/member/invite.tmpl deleted file mode 100644 index e5d157593..000000000 --- a/templates/org/member/invite.tmpl +++ /dev/null @@ -1,22 +0,0 @@ -{{template "base/head" .}} -
- {{template "org/header" .}} -
-
- {{template "base/alert" .}} -

{{.i18n.Tr "org.members.invite_desc" .Org.DisplayName}}

-
- {{.CsrfTokenHtml}} -
- -
- -
-
-
-
-{{template "base/footer" .}} diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index d7514d8ba..e47008c89 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -3,12 +3,6 @@ {{template "org/header" .}}
{{template "base/alert" .}} - {{if .IsOrganizationOwner}} - -
- {{end}}
{{range .Members}}