How to change form fields depending on the user

0

I'm using Flask Admin and Flask security to log in to it. I can get no problem to define depending on the role of a user whether or not he can create an object, but I would also like to be able to add or remove fields from the creation / editing form depending on that role, is it possible?

I tried to change the field form_columns to a property but whenever I access the current_user in this or another field of form it is still None and therefore I can not perform any control. >     

asked by anonymous 15.05.2018 / 23:07

1 answer

0

I decided to ask because I was a few days ago looking for an answer but I had not found it, today I could find one in the stackoverflow in English, if anyone has an interest follow the link: #

I apologize for the question that there was already an answer on another stack.

    
15.05.2018 / 23:21