1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00

Simplify return statement

This commit is contained in:
hugmouse 2021-10-29 16:59:30 +08:00 committed by handlerug
parent 80f37420db
commit b2789f923f

View File

@ -97,12 +97,10 @@ func (user *User) CanProceed(route string) bool {
user.RLock()
defer user.RUnlock()
right, _ := groupRight[user.Group]
minimalRight, _ := minimalRights[route]
if right >= minimalRight {
return true
}
return false
right := groupRight[user.Group]
minimalRight := minimalRights[route]
return right >= minimalRight
}
func (user *User) isCorrectPassword(password string) bool {