expose origin of permission in perm dict for users
Currently when we build permissions tree there are multiple origins of permissions. It would be usefull to know from where the user got a repository.read permission. During the big calculation we should store the origin of permissions into a separate dict so we can display it in permissions summary page.
example origin types:
- explicit permissions on repo
- permission inherited from user group
- permissions inherited from default repo permissions
- permissions inherited from global default permission.
This would allow to check if some users don't have wrong user rights, by checking the origin.
Example: it's ok if user has read that it's coming from explicit assignment (one can go to that repo and change it), but it would be wrong if that read permissions comes from inherited global one. It would simply allow to detect nicer exception and improve security