Getting details of logged in user

Wappler Version : all versions
Operating System : Windows
Server Model: NodeJS
Database Type: MariaDB
Hosting Type: Custom

Expected behavior

Be able to get the identity of the logged in user.

Actual behavior

No identity available

How to reproduce

1, add Security Restrict
2. add database query
3. in the Query Builder add a Condition


4. no identity available
image

Workaround

  1. add a Security Provider and the identity is available.

There’s a security identity module aswell as restrict provider etc etc can’t you use that or am I misunderstanding this?

I knew it. Another senior moment. This time however, I did not know of the existence of the Security Identity module.

Do you have experience with the module? Does it get added to Security Restrict or does it come in place of Security Restrict.

I believe it just grabs the id of the user I haven’t dug too much into restricts yet

1 Like

I’ll give it a go. Thanks for your input.

1 Like

This was changed a long time ago.
You should NOT add security provider inside SA anymore.
Just use the security identity step. Add it after the security restrict step.

Or, you can also just move it to Globals.
Click on the Globals node, and add security identity as a step. Then it will be available as you expect in point 4.
Although this will show up everywhere, it does not cause any issues on non-secure SA.

1 Like