Should I use a blacklist/whitelist toggle?
I've been meaning to add a feature to my application's config files that allow you to blacklist or whitelist certain users. Which one is a better mechanic?
Mechanic 1
Block certain people
{
"blacklist": [
"these",
"users",
"are",
"blocked"
],
"whitelist": [
"these",
"users",
"are",
"always",
"allowed"
]
}
(result: blocked
is the only blocked user)
Block all except a few people
{
"blacklist": [
"*"
],
"whitelist": [
"these",
"users",
"are",
"allowed"
]
}
(result: these
, users
, are
, allowed
are the only allowed users)
Mechanic 2
Block certain people
{
"blacklist": [
"these",
"users",
"are",
"blocked"
],
"isWhitelist": false
}
(result: these
, users
, are
, blocked
are blocked)
Block all except a few people
{
"blacklist": [
"these",
"users",
"are",
"allowed"
],
"isWhitelist": true
}
(result: these
, users
, are
, allowed
are the only allowed users)
Which one would work better and feel more intuitive?
Thanks.