None of the NiFi processor ever execute as the user who is logged in. There is one JVM which executes the code for all processors running on the NiFi canvas regardless of whom added them.
The NiFi authorization policies govern what interaction with the canvas are allowed for a given authenticated user. NiFi also does not use sessions so there is no notion of a "current user". Every single request to NiFi must contain user authorization.
Not sure how you intent to code your custom processor to obtain a specific users access rights to a topic. Problem one is determining which user account to use. There could be multiple users "logged in" to the same NIFi UI.
@Matt Clarke laid it all out correctly, but I would add that usually the external system you are connecting to (sounds like you are talking about kafka) has authentication and authorization concepts so that is where the permissioning happens.