Fix the bug of share auth.
This commit is contained in:
parent
cffa82226d
commit
e64a73eb67
@ -278,6 +278,10 @@ func (this *ShareController) Browse(writer http.ResponseWriter, request *http.Re
|
|||||||
user := this.findUser(request)
|
user := this.findUser(request)
|
||||||
share := this.shareService.CheckShare(request, shareUuid, code, user)
|
share := this.shareService.CheckShare(request, shareUuid, code, user)
|
||||||
bridges := this.bridgeDao.FindByShareUuid(share.Uuid)
|
bridges := this.bridgeDao.FindByShareUuid(share.Uuid)
|
||||||
|
shareOwner := this.userDao.FindByUuid(share.UserUuid)
|
||||||
|
if shareOwner.Status == USER_STATUS_DISABLED {
|
||||||
|
panic(result.BadRequestI18n(request, i18n.UserDisabled))
|
||||||
|
}
|
||||||
|
|
||||||
if puuid == MATTER_ROOT {
|
if puuid == MATTER_ROOT {
|
||||||
|
|
||||||
|
@ -92,6 +92,11 @@ func (this *ShareService) ValidateMatter(request *http.Request, shareUuid string
|
|||||||
|
|
||||||
share := this.CheckShare(request, shareUuid, code, user)
|
share := this.CheckShare(request, shareUuid, code, user)
|
||||||
|
|
||||||
|
shareOwner := this.userDao.FindByUuid(share.UserUuid)
|
||||||
|
if shareOwner.Status == USER_STATUS_DISABLED {
|
||||||
|
panic(result.BadRequestI18n(request, i18n.UserDisabled))
|
||||||
|
}
|
||||||
|
|
||||||
//if shareRootUuid is root. Bridge must has record.
|
//if shareRootUuid is root. Bridge must has record.
|
||||||
if shareRootUuid == MATTER_ROOT {
|
if shareRootUuid == MATTER_ROOT {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user