My app keeps control of Equipment in a big company. We have several locations, and wants to give permissions based on location.
I need help setting up the following permissions for Power App / Dataverse:
Security levels
Each location has been split in to four permission levels (security groups).
- Read access
- Loan / return access (must be able to write the loan status to the table)
- Data maintainer (can add/edit equipment, have access to send items to service)
- Administrator (admin panel for adding locations, categories, departments, etc).
Table content
I have one table which separates datatype with the following columns:
An example:
DIFFERENT ITEMS:
Location 1 - Equipment - 1 - Headset...
Location 1 - Equipment - 2 - Laptop....
Location 2 - Equipment - 1 - TV.....
Sandbox - Equipment - 1 - TestTest...
LOGS FOR THESE ITEMS:
Location 1 - Log - 1 - Headset - Loaned....
Location 1 - Log - 1 - Headset - Returned..
Location 1 - Log - 1 - Headset - Repaired...
Location 2 - Log - 1 - TV - Loaned ...
ISSUE 1
When starting the app, you get a choice of different locations from a dropdown menu (possible to change in app afterwards).
Dropdown will cotain the following data:
ClearCollect(collectLocation,(Distinct(Filter('Equipment List',DataType = "Location"),Location)));
How can I make sure that only that the user can only see the location he/she has access to through the security group?
ISSUE 2
When you have chosen the location, the app will only show data from that location inside the app. It is not possible to transfer items from one location to another by design.
How do I make sure that only people with the correct security group can write to the table?
The security role will be set to team/user i suppose. But how do we make sure that all the items from Location 1 is owned by the Location 1 team, with the right permissions?
ISSUE 3
When loaning equipment you write a new row to the table (log entry) and you update the equipment information row.
These are the same write permissions in the security role as is required for a data maintainer.
Is it possible to use security groups to hide/show buttons inside Power Apps? If you have data maintainer access, you will see the edit / add new item buttons?
Thankful for any help regarding these problems!
I have looked around, but couldn't not easily find a solution for my needs.