Field permissions based on Spring Cloud

problem description

recently, I am working on permission design, and one of the more troublesome problems for me is how to do data field permissions. For example, the system has two roles: ROLE_ADMIN and ROLE_GUEST, when querying the list of goods, ROLE_ADMIN can see the price (price field), ROLE_GUEST can not, need to be represented by -. The system is a micro-service architecture, and field permissions can only be done at the gateway layer (if you do it in a micro-service, it is likely to appear: call link A-> B-> C-> DMagi B if a field is masked and A happens to use this field for calculation).

the environmental background of the problems and what methods you have tried

I want to write the URL and the field to be verified into the database, check out the verification field based on the user query role at the gateway, and then replace the corresponding value in the return value (json). But the performance will be very poor.

related codes

not available for the time being

what result do you expect? What is the error message actually seen?

what can I do to improve performance?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b382a6-2b944.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b382a6-2b944.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?