mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
Perform full email match
This commit is contained in:
@@ -310,7 +310,7 @@ function listUsers() {
|
|||||||
|
|
||||||
users=$(echo "${response}" | jq -r ".[] | .verifiable_addresses[0].value" | sort)
|
users=$(echo "${response}" | jq -r ".[] | .verifiable_addresses[0].value" | sort)
|
||||||
for user in $users; do
|
for user in $users; do
|
||||||
roles=$(grep "$user" "$elasticRolesFile" | cut -d: -f1 | tr '\n' ' ')
|
roles=$(grep ":$user\$" "$elasticRolesFile" | cut -d: -f1 | tr '\n' ' ')
|
||||||
echo "$user: $roles"
|
echo "$user: $roles"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@@ -341,7 +341,7 @@ function adjustUserRole() {
|
|||||||
|
|
||||||
filename="$socRolesFile"
|
filename="$socRolesFile"
|
||||||
hasRole=0
|
hasRole=0
|
||||||
grep "$role:" "$socRolesFile" | grep -q "$identityId" && hasRole=1
|
grep "^$role:" "$socRolesFile" | grep -q "$identityId" && hasRole=1
|
||||||
if [[ "$op" == "add" ]]; then
|
if [[ "$op" == "add" ]]; then
|
||||||
if [[ "$hasRole" == "1" ]]; then
|
if [[ "$hasRole" == "1" ]]; then
|
||||||
echo "User '$email' already has the role: $role"
|
echo "User '$email' already has the role: $role"
|
||||||
|
|||||||
Reference in New Issue
Block a user