I have a situation where I need to restrict access to certain data coming from a schema when a user queries from a particular folder he should be able to access only the data available in that folder that he have access to but currently he is getting all the data present in different folders since the data is stored in a universal schema.
Let me know how could I achieve this.
First, you have to ensure that your schema has the folder concept (must have the @folderModel attribute, the "folder" link etc.) You can find this concept in a lot of native schema such as xtk:wokflow, nms:delivery, nms:recipient etc.
On a second hand, verify that the model delcaration into the navtree has the folderLink declared ( usually, <nodeModel folderLink="folder" ).
This way, you will have elements of your schema into folders, and this one won't be a "universal schema" anymore (Guess that means a schema without folder concept). You should be able to manage access with the operator rights.