User.is_admin is not working with OasisUserManagement
Hey Nomad, @himanel1 @mscheidg
I am testing the capabilities of an admin user for automated uploading of data.
I set the admin id in my `nomad.yaml` file.
Then the code in `nomad/search.py` throws an error when i do an API call with `owner='admin'`. So i played around a bit and i found that
```python
if user_id is None or not datamodel.User.get(user_id=user_id).is_admin:
raise AuthenticationRequiredError('This can only be used by the admin user.')
```
throws the error,
while
```python
if user_id is None or not user_id == config.services.admin_user_id:
raise AuthenticationRequiredError('This can only be used by the admin user.')
```
doesnt. Somehow `datamodel.User.get(user_id=user_id).is_admin` is not doing what it should in my opinion, or am i missing something?
Best Micha
issue