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:
parent
80f37420db
commit
b2789f923f
10
user/user.go
10
user/user.go
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user