Role Based Access Control

Hey guys I'm currently working on developing a RAG application with 100 documents however, these documents should be split based on user. For example a CEO would have access to all 100 documents whereas a junior would have access to 5 documents. Has anyone done that or have any idea how to do it? I do have a normal RAG app connected to postgres with fastapi integration but I'm not sure how to implement role based access control (RBAC)