Fix PR, milestone and label functionality if issue unit is disabled (#2710)
* Fix PR, milestone and label functionality if issue unit is disabled or not assigned to user * Fix multi-actions in PR page * Change error message * Fix comment update and delete functionality in PR
This commit is contained in:
@ -15,14 +15,12 @@ import (
|
||||
|
||||
// AddTimeManually tracks time manually
|
||||
func AddTimeManually(c *context.Context, form auth.AddTimeManuallyForm) {
|
||||
issueIndex := c.ParamsInt64("index")
|
||||
issue, err := models.GetIssueByIndex(c.Repo.Repository.ID, issueIndex)
|
||||
if err != nil {
|
||||
if models.IsErrIssueNotExist(err) {
|
||||
c.Handle(http.StatusNotFound, "GetIssueByIndex", err)
|
||||
return
|
||||
}
|
||||
c.Handle(http.StatusInternalServerError, "GetIssueByIndex", err)
|
||||
issue := GetActionIssue(c)
|
||||
if c.Written() {
|
||||
return
|
||||
}
|
||||
if !c.Repo.CanUseTimetracker(issue, c.User) {
|
||||
c.Handle(http.StatusNotFound, "CanUseTimetracker", nil)
|
||||
return
|
||||
}
|
||||
url := issue.HTMLURL()
|
||||
|
Reference in New Issue
Block a user