In the mentioned user exit, please create a include with a Z name.
Z<name> if found.
Create a TVARVC variant with th elist of user ID s who have authorization as per your need.
TVARVC is a SAP standard table.
You can save variants in SM30 , TVARV.
Save your variant with a name of your choice (parameter) and store user ids in it as you need.
Then within the include, before your code logic, include a select query on TVARVC table with name as variant name you have just created and then only for the user ids that are retrieved , compare the sy-uname and proceed if it exists in the list.