I have the following requirements regarding permisisons which so far couldn't find a good solution for. Appreciate your thoughts and experience.
When adding/editing an item and based on its metadata, specific users(s) shall have access as edit, others as view and the rest none. The issue is that assigning the permissions is a bit difficult. The user can be assigned to view the requests that are submitted by a specific country. Also he might be able to view the requests that are submitted by a specific company and even both. User X can view Country A. User Y can view Company B (that might exist in Country A and Country C) User Z can view country A and Company B -> only requests submitted from Country A from the Company B
This is just a subset of data and it prolongates to additional 5 columns (Departments, Business Unit, Cost Center, etc...)
What is the best way to manage such kind of permisisons given that it should be easily managed with the ability to have instantanuous changes where adding a user for Company A will directly provide him access to all previous submitted requests.
An option would be having a list where users are added with the differnt assigned data as coulumn and automatically adding them to the related SharePoint groups that follow a specific pattern. Access shall be granted to these groups. The issue is that I foresee a huge amount of SharePoint groups that shall be created: (Role_Country_Company_BusinessUnit_Department_CostCenter) and all the individual combinations (Role_Country, Role_Compnay, Role_CostCenter and ROle_Country_Company) etc...
Application enviornment is SharePoint online and SharePoint 2016 On-Premise (due to data privacy requirements for some countries).
Appreciate your input.