OpenBAS-Platform / openbas

Open Breach and Attack Simulation Platform
https://openbas.io
Other
209 stars 23 forks source link

Be able to filter users on admin property #1132

Closed Dimfacion closed 2 weeks ago

Dimfacion commented 2 weeks ago

Description

For our internal needs, we need to be able to filter out the list of users on whether or not they are admins.

Environment

  1. OS (where OpenBAS server runs): All
  2. OpenBAS version: OBAS 1.1.0
  3. OpenBAS client: Rest API
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Make a call to api/users/search with the following body :

    {
    "sorts":[
        ],
    "filterGroup": 
        {
            "filters": [
                {
                    "key":"user_admin",
                    "values":["true"],
                    "mode": "and",
                    "operator": "eq"
                }
            ],
    
            "mode": "and"
        }
    ,    
    "textSearch":"",
    "page":0,
    "size":100
    }

Expected Output

Only the users that are admins

Actual Output

500 Internal Server Error

Additional information

Screenshots (optional)