bgr11n
1
Hi.
I am wonderning is there a way in ash_typescript to pass to the frontend a list of actions that current user is authorized to do?
For example user is able to create but not to remove the resource, is there a way to have an rpc that will return something like:
```json
[“resource.update”]
````
Or maybe there is something similar?
Thank you!
bgr11n
2
Or maybe there is other ash way of how to check on frontend side if current user is able to create a post in order to show the Create button in UI?
You can write a generic action that returns a list of strings, and use custom logic around Ash.can? to return a list of actions the user can take.
bgr11n
4
@zachdaniel Got it, thank you!