1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-02-10 16:10:17 +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() user.RLock()
defer user.RUnlock() defer user.RUnlock()
right, _ := groupRight[user.Group] right := groupRight[user.Group]
minimalRight, _ := minimalRights[route] minimalRight := minimalRights[route]
if right >= minimalRight {
return true return right >= minimalRight
}
return false
} }
func (user *User) isCorrectPassword(password string) bool { func (user *User) isCorrectPassword(password string) bool {