I am using Django Guardians in my project and it works fine so far, but there is some problem:
I need to assign permissions from model1 to the instance of the model2.
Real example: The shop has some contracts and the shop owner wants to assign his employees permission to change contract fields (e.g. field1).
So we have 3 models now: Shop, Contract, and User, and each model has it's own defined permissions per field like: can_change_field1, ...
All permissions that employee can have must be related to the Shop model because when a shop owner assign contract permissions to his employee (to change field1 in contract in shop1), it mustn't affect another shop (So user will not be able to change that field e.g. field1 in shop2,...).
1st solution can be: to create all permissions in shop model (for all models: Contract,...). But it seems kinda of messy to me. What do you think?
Please, Can you suggest some nice solution to this problem?