Fix misplaced if
This commit is contained in:
parent
06eb64ecf5
commit
cbcfacb06a
|
@ -18,10 +18,10 @@ func GetTokenFull(token string, db *sql.DB) (common.Token, bool) {
|
|||
Scan(
|
||||
&t.ID, &t.UserID, &privs, &priv8,
|
||||
)
|
||||
t.Privileges = common.Privileges(privs)
|
||||
if priv8 {
|
||||
privs = common.PrivilegeRead | common.PrivilegeReadConfidential | common.PrivilegeWrite
|
||||
}
|
||||
t.Privileges = common.Privileges(privs)
|
||||
switch {
|
||||
case err == sql.ErrNoRows:
|
||||
return common.Token{}, false
|
||||
|
|
Loading…
Reference in New Issue
Block a user