aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/org
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/org')
-rw-r--r--routers/web/org/org_labels.go4
-rw-r--r--routers/web/org/setting.go6
-rw-r--r--routers/web/org/teams.go2
3 files changed, 6 insertions, 6 deletions
diff --git a/routers/web/org/org_labels.go b/routers/web/org/org_labels.go
index d79ffc597c..bfa9f162c3 100644
--- a/routers/web/org/org_labels.go
+++ b/routers/web/org/org_labels.go
@@ -17,7 +17,7 @@ import (
// RetrieveLabels find all the labels of an organization
func RetrieveLabels(ctx *context.Context) {
- labels, err := models.GetLabelsByOrgID(ctx.Org.Organization.ID, ctx.FormString("sort"), db.ListOptions{})
+ labels, err := models.GetLabelsByOrgID(ctx, ctx.Org.Organization.ID, ctx.FormString("sort"), db.ListOptions{})
if err != nil {
ctx.ServerError("RetrieveLabels.GetLabels", err)
return
@@ -59,7 +59,7 @@ func NewLabel(ctx *context.Context) {
// UpdateLabel update a label's name and color
func UpdateLabel(ctx *context.Context) {
form := web.GetForm(ctx).(*forms.CreateLabelForm)
- l, err := models.GetLabelInOrgByID(ctx.Org.Organization.ID, form.ID)
+ l, err := models.GetLabelInOrgByID(ctx, ctx.Org.Organization.ID, form.ID)
if err != nil {
switch {
case models.IsErrOrgLabelNotExist(err):
diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go
index 5cd245ef09..758ca47af6 100644
--- a/routers/web/org/setting.go
+++ b/routers/web/org/setting.go
@@ -66,7 +66,7 @@ func SettingsPost(ctx *context.Context) {
// Check if organization name has been changed.
if org.LowerName != strings.ToLower(form.Name) {
- isExist, err := user_model.IsUserExist(org.ID, form.Name)
+ isExist, err := user_model.IsUserExist(ctx, org.ID, form.Name)
if err != nil {
ctx.ServerError("IsUserExist", err)
return
@@ -110,7 +110,7 @@ func SettingsPost(ctx *context.Context) {
visibilityChanged := form.Visibility != org.Visibility
org.Visibility = form.Visibility
- if err := user_model.UpdateUser(org.AsUser(), false); err != nil {
+ if err := user_model.UpdateUser(ctx, org.AsUser(), false); err != nil {
ctx.ServerError("UpdateUser", err)
return
}
@@ -207,7 +207,7 @@ func Webhooks(ctx *context.Context) {
ctx.Data["BaseLinkNew"] = ctx.Org.OrgLink + "/settings/hooks"
ctx.Data["Description"] = ctx.Tr("org.settings.hooks_desc")
- ws, err := webhook.ListWebhooksByOpts(&webhook.ListWebhookOptions{OrgID: ctx.Org.Organization.ID})
+ ws, err := webhook.ListWebhooksByOpts(ctx, &webhook.ListWebhookOptions{OrgID: ctx.Org.Organization.ID})
if err != nil {
ctx.ServerError("GetWebhooksByOrgId", err)
return
diff --git a/routers/web/org/teams.go b/routers/web/org/teams.go
index 3689ffe93d..284fb096f3 100644
--- a/routers/web/org/teams.go
+++ b/routers/web/org/teams.go
@@ -122,7 +122,7 @@ func TeamsAction(ctx *context.Context) {
}
uname := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.FormString("uname")))
var u *user_model.User
- u, err = user_model.GetUserByName(uname)
+ u, err = user_model.GetUserByName(ctx, uname)
if err != nil {
if user_model.IsErrUserNotExist(err) {
ctx.Flash.Error(ctx.Tr("form.user_not_exist"))