Skip to content

Fixed excessive categories being displayed from acls#7889

Merged
madolson merged 1 commit intoredis:unstablefrom
madolson:acl-getuser-fix
Oct 8, 2020
Merged

Fixed excessive categories being displayed from acls#7889
madolson merged 1 commit intoredis:unstablefrom
madolson:acl-getuser-fix

Conversation

@madolson
Copy link
Contributor

@madolson madolson commented Oct 6, 2020

When there are multiple categories that fix the criteria of "more than half of the commands are in this group, either by inclusion or exclusion," we include all of them. This can result in overlapping categories that require a lot of re-adding or re-removing. For example:

"-@ALL +@READ" -> "-@ALL +@READ +@set +@sortedset +@hash +@bitmap +@geo -sdiffstore -hmset -setbit -hsetnx -zremrangebyscore -zpopmax -spop -sort -zpopmin -hset -georadiusbymember -zremrangebylex -geoadd -sunionstore -bitfield -bzpopmin -sadd -zadd -hdel -zunionstore -bitop -zinterstore -bzpopmax -hincrby -sinterstore -zremrangebyrank -zrem -smove -zincrby -srem -hincrbyfloat -georadius"

Since the set, sortedset, hash, bitmap, and geo categories have a majority of read commands, they all get included, but then need all their write to be removed.

We still might not build the "optimal" string, but we should only build shorter strings after this change.

@madolson madolson merged commit 2127f7c into redis:unstable Oct 8, 2020
@oranagra oranagra mentioned this pull request Oct 26, 2020
oranagra pushed a commit that referenced this pull request Oct 27, 2020
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 4, 2020
jschmieg pushed a commit to memKeyDB/memKeyDB that referenced this pull request Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants