docdoku / docdoku-plm

The project purpose is to develop a comprehensive, robust open source PLM (Product LifeCycle Management) solution.
http://www.docdokuplm.com
GNU Affero General Public License v3.0
241 stars 98 forks source link

Error in returned data from /auth/login service #1171

Closed ludoBarel closed 6 years ago

ludoBarel commented 6 years ago

When testing with curl command, the field admin is never true even thought the user is define as admin in USERGROUPMAPPING table.

Traces of execution :

Content of USERGROUPMAPPING :

mysql> select * from USERGROUPMAPPING; +--------+-----------+ | LOGIN | GROUPNAME | +--------+-----------+ | $test | admin | | admin | users | | master | admin | | root | users | | root1 | users | | root2 | root | | test | users | +--------+-----------+ 7 rows in set (0.00 sec)

Command line used : $ curl -i --header "Content-Type: application/json" --request POST -k http://localhost:8080/eplmp-server-rest/api/auth/login --data '{"login":"master","password":"root"}'

Result : {"admin":false,"email":"","enabled":true,"language":"en","login":"master","name":"master","timeZone":"CET"}

However, this not have any impact on services which need to be execute by an administrator.

mguimard commented 6 years ago

fixed by https://github.com/polarsys/eplmp/commit/e807c30c327a6f282009ecfa35dd5debbde91b30