Fix misplaced if

This commit is contained in:
Howl 2016-06-16 13:14:19 +02:00
parent 06eb64ecf5
commit cbcfacb06a
1 changed files with 1 additions and 1 deletions

View File

@ -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