mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-17 14:00:01 +02:00
Multiple assignees (#3705)
This commit is contained in:
parent
238a997ec0
commit
95f2e2b57b
36 changed files with 1012 additions and 451 deletions
|
@ -993,7 +993,7 @@ func deleteUser(e *xorm.Session, u *User) error {
|
|||
// ***** END: PublicKey *****
|
||||
|
||||
// Clear assignee.
|
||||
if _, err = e.Exec("UPDATE `issue` SET assignee_id=0 WHERE assignee_id=?", u.ID); err != nil {
|
||||
if err = clearAssigneeByUserID(e, u.ID); err != nil {
|
||||
return fmt.Errorf("clear assignee: %v", err)
|
||||
}
|
||||
|
||||
|
@ -1110,8 +1110,8 @@ func GetUserByID(id int64) (*User, error) {
|
|||
return getUserByID(x, id)
|
||||
}
|
||||
|
||||
// GetAssigneeByID returns the user with write access of repository by given ID.
|
||||
func GetAssigneeByID(repo *Repository, userID int64) (*User, error) {
|
||||
// GetUserIfHasWriteAccess returns the user with write access of repository by given ID.
|
||||
func GetUserIfHasWriteAccess(repo *Repository, userID int64) (*User, error) {
|
||||
has, err := HasAccess(userID, repo, AccessModeWrite)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue