This paper introduces a modified Query-Roles Based Access Control (Q-RBAC) model to enhance data security and querying performance for ontology data access. The model addresses the limitations of traditional access policies in ontology repositories by incorporating an additional user policy creation layer, which refines access rights between administrators and users. It proposes a framework that integrates ontology-based data access methods with role-based access control to improve the overall efficiency of data querying in NoSQL databases.