define access control with editor in .net core
define access control with editor in .net core

Hello i started using Editor and i can´t seem to find any example on how to define view and edit privileges for a table...
Can anybody give me some help!?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @Pedro Martins ,
This section of the manual should help - it's addressing this very aspect.
Cheers,
Colin
Hello @colin i don´t know how to use the access.editing code.
I usually define in my controllers access this way...
[Authorize(Roles = "Editor")]
public IActionResult Add()
Or in my view to show or hide stuff
if(User.IsInRole("Editor")
Do you have any example of it???
We don't make any assumptions about the login / security framework you are using, so as Colin says, you need to setup your Editor instance with the permissions that you want through the
Field.Set()
/Field.Get()
methods - e.g.:Allan
Thanks Alan that should work fine. Will give you feedback as soon as i test it