mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 16:48:30 +01:00
fixed variable usage for userID.
This commit is contained in:
parent
242f5f0972
commit
46c8ef142f
@ -67,9 +67,9 @@ func (idc *ItemDetailController) Get() {
|
||||
userID := sessionUserID.(int)
|
||||
|
||||
idc.Data["Username"] = idc.GetSession("username")
|
||||
idc.Data["UserId"] = sessionUserID.(int)
|
||||
idc.Data["UserId"] = userID
|
||||
|
||||
roleList, err := dao.GetUserProjectRoles(models.User{UserID: sessionUserID.(int)}, projectID)
|
||||
roleList, err := dao.GetUserProjectRoles(models.User{UserID: userID}, projectID)
|
||||
if err != nil {
|
||||
beego.Error("Error occurred in GetUserProjectRoles:", err)
|
||||
idc.CustomAbort(http.StatusInternalServerError, "Internal error.")
|
||||
|
Loading…
Reference in New Issue
Block a user