Access control is used for intra-organization collaboration and has more importance when this collaboration is inter-organization. This new scope of collaboration introduces flexibility issues due to the heterogeneity of organizations' collaboration schemas. It requires strict and coherent permission management to deal with the dynamic aspects of inter-organization activities. To deal with these issues, a Role Based Access Control (RBAC) approach is widely used in collaboration platforms. However, its recent implementations lack the flexibility to enable the dynamicity of collaboration and present some inconsistency problems. In this paper, we propose a generic and semantic access control model to overcome these limits for collaborative work. The main contribution of this paper is to address the flexibility and inconsistency issues in RBAC in collaborative environments in both intra and inter-organizations with semantic representation of roles and access policies. The goal is to have a dynamic and smart access control system that enables the protected access to different shared resources in complex collaborative situations.